From patchwork Wed Jun 24 15:18:43 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1424 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id AC4F83F06D for ; Wed, 24 Jun 2020 17:18:59 +0200 (CEST) Received: by mail-pl1-f199.google.com with SMTP id x6sf1732262plb.9 for ; Wed, 24 Jun 2020 08:18:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1593011937; cv=pass; d=google.com; s=arc-20160816; b=JtVywrGJ0rNqIuYn0LhN4/UN0xJvYJaC+PHZuud8IOWqGOyaZWYLhRPQbly2PIcONl kHkgr5/y1CwTSSwFzKPG0IcqDv8DXy+qQiDyvjiDQGIUOpYtAobg/H4sKhfzqESdmo+t 33fzCHfrzAeqJKU+H8DxhW73I1L3MV/Lb2EnRTpWYDqmZvbzAQ0szYCfwt4L+EB/BlSa N9vHPMp/ohaEmcwIf8UVPIXj7ay+3KPzjpd7UFzc/f+MO6HXk0bi7KtT86QhHWpG/Aum OSetEhlDvKJAczNvC9dStbHqIhZv/Cpg41D3+uUzRp7DrnZqAFIiJ+HJV3sKh+gk1PfC H2qw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=j6KwxIQqjc90YDMvEyTf18u55fbFUBoqlq4ALpIxU5c=; b=O72tbMiyRfg4EYMrzpQu8rFMuDE9nzGTbOuDZR0abOIYpk1sjDWj9wfLW/Xj55yflQ kPdyB2TxxC6ueYQb7e8glQhYcFmaFVF1M2Q6iQvjur+b7VIOUMM9OtPhL71LiA98G06C 5iwXfPpYPLZlbIGVBDYyFtsvxFwk1/HzM4byKqugK40lfEW4r9NY4PYgKhiWseTONdDo rVF/okhtFOH9vReEhrXb6DKcJFJxrYGUplHNYlZsTIniGWbNaush9+SMxsnwTCnLVsnw pZudHPddSLpYHJoZFrzbtaKfNehbQAp+H0eyDmW7VO03TeQdnODSJzp8Xnov4//c+Fvf Xhsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DcJdxP1i; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=j6KwxIQqjc90YDMvEyTf18u55fbFUBoqlq4ALpIxU5c=; b=GVJAGx0XABbFb3F9qwkzm7PZp9iuxc37xQyQ6EJyXK+YZcnJEVwNjoc3jKNi0deyXy fDl8ZG0BZ5bDtg9pdXRZF1lCcuMOhGZjwosI1jFTkweR1eF1hvAsM/bsviZJZT78T74g Yc5Vuql4mzRH2AtZoEbzsGhqfkhDWGzACvjTY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=j6KwxIQqjc90YDMvEyTf18u55fbFUBoqlq4ALpIxU5c=; b=KK1tpXFqGVrglTay9GGZEkedxFcl+uVF4hRltCya1xpKANg8c4si528MSQ/Z4R7dGT kDflZ5Oe12in4guhkzDFTThOCKTfvXe3U53DjPypDvfcyXEdFMnFWV2VIK7hkdsTKzGM lAamqgNqnOa0BRTY99YbUA2YHxxAoqk7tTTXO9nfzxrSVF7PuyoPd2EvJVDaHA9DYjgA ny2ogqZogkd9RKAb7R9XUn0k+ZkHHz6VYvAPKtZHiEfv5P9xsU8biDQ72/om3wxkFRLS 8pPg0mAFC06Y+YuVB6E3/Y0moHDwjyjgmC3I/j1YTcyowZ1nx/hz4OyoUkD+6oar5sXt ph7Q== X-Gm-Message-State: AOAM531QhMXgh/Kfu82tvFjZFfL1hwAUwKNNMDm4p3/4KT2EWvjbcRsi b5urYGy67SC4yNabjTAMhWejbiza X-Google-Smtp-Source: ABdhPJzrtbJ26FDFOYMnZQ5q7VkfhuwfEZTfvRxCIG1sIv2RUFZJ+Z/vRHuqgbxtDB9Hp/2WAV8MaQ== X-Received: by 2002:a62:1c5:: with SMTP id 188mr29870258pfb.213.1593011937458; Wed, 24 Jun 2020 08:18:57 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:6b02:: with SMTP id o2ls1083454plk.7.gmail; Wed, 24 Jun 2020 08:18:57 -0700 (PDT) X-Received: by 2002:a17:90b:18b:: with SMTP id t11mr4335054pjs.236.1593011936954; Wed, 24 Jun 2020 08:18:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593011936; cv=none; d=google.com; s=arc-20160816; b=0KaSYOVIOgxAib1JXD5l6RA4W33Npl7NBtGyqdXuesxQSDLhJD8cGYMnhnpokfp6ra +vihAb97LmEw89lYDL7iS8LmpegoCr+To4yksmdCp8L5I8G1yFgzo3f2CeX6vyVYhqka jBs0ZSLN4AnLqnXUC6MaQk9lUt+Wh+RgKAfVI7epLPj3jq8yDnQLkxfTRNtGpHIU1WDv 3vDMMyNN5crFHu0Jexzlzltmo487FKAB/1lGFWdArMZCP+3mLnaxVbwDlTbxzprkmcvj o9/+SihCiS9J0hZNOs8QscVZLoDPvhpGqaY3eZcJ2isshbEEKVY5seX7LR4qskcq8my1 1EHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=GMpGZV1WTtFiM81w8xoa+rMVHgxOdmU80VRlV29Io2Y=; b=eq9AFHqnNqa769V/jnA4BzbWaHoRQ4QryM1U/RmVLuU2TIvw5wHgD2LSQtMtKNHMKQ 5ofB+P0hDKR57C8V4WnbYDJDNXrqaBYpOAuHJ5H14WfyVvnnf9nSwsnaulq3XHn7l/Jc XKwh0moDc43k2eMQEfcVgSCGgIsZaku4dctFJnrerPJSC2LBW6prwmM+I3jbcTzwtPz0 V/v5Q/cRKq4ZTSKEe+Lw0Px7q0ZOytxAL+Nuly2b6a8feWksWnCgdop0k+1rtdmqwjjO +RZ+IF31+ckZflRl+WkhnMMIh3XoPrz1vRQtBQChEQloO3ZBtFvV0xqFDocl+LVWofDL CUcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DcJdxP1i; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id y26sor25213081pgk.67.2020.06.24.08.18.55 for (Google Transport Security); Wed, 24 Jun 2020 08:18:56 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; X-Received: by 2002:a63:fa4d:: with SMTP id g13mr22182860pgk.26.1593011935554; Wed, 24 Jun 2020 08:18:55 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c809:c7d5:85fa:81a4:b20a:44d8]) by smtp.gmail.com with ESMTPSA id oc6sm6377024pjb.43.2020.06.24.08.18.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 08:18:54 -0700 (PDT) From: Jagan Teki To: Anatolij Gustschin , Simon Glass , Philipp Tomsich , Kever Yang Cc: sunil@amarulasolutions.com, u-boot@lists.denx.de, linux-amarula@amarulasolutions.com, Jagan Teki , Da Xue Subject: [PATCH] video: rk_vop: Fix wrong bpix for frame buffer Date: Wed, 24 Jun 2020 20:48:43 +0530 Message-Id: <20200624151843.120134-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=DcJdxP1i; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Video framework would use plat size as a frame buffer pointer in rockchip video drivers. Typical frame buffer pointer would compute based on maximum resolutions supporting followed by bits per pixel value. Right now the value 4 (VIDEO_BPP16) is using on this computation even though the HDMI vop_id assigned as VIDEO_BPP32. This results below synchronous abort while clearing the frame buffer to the background color. "Synchronous Abort" handler, esr 0x96000045 elr: 0000000000236ff0 lr : 0000000000236f74 (reloc) elr: 00000000f6f6eff0 lr : 00000000f6f6ef74 x0 : 00000000f8000000 x1 : 0000000000000000 x2 : 00000000f97a4000 x3 : 00000000ff1a0000 x4 : 00000000ff1a0000 x5 : 0000000000000035 x6 : 000000000000000a x7 : 00000000f4f1fe50 x8 : 0000000000000000 x9 : 0000000000000008 x10: 00000000ffffffd8 x11: 0000000000000006 x12: 000000000001869f x13: 0000000000005dc0 x14: 0000000000000000 x15: 00000000ffffffff x16: 0000000000000001 x17: 0000000000000032 x18: 00000000f4f31dc0 x19: 00000000f4f47160 x20: 00000000f6fb5814 x21: 00000000f4f1feb0 x22: 00000000f6fea748 x23: 00000000f6fea748 x24: 00000000f4f47108 x25: 00000000f4f47110 x26: 00000000f4f46ed0 x27: 00000000f4f47118 x28: 0000000000000002 x29: 00000000f4f1fe50 Reproduced on, Board: roc-rk3399-pc Video Out: HDMI with 3480x2160 resolution. Fix this by using maximum bpix value which is VIDEO_BPP32 to satisfy allĀ  vop_id connections. Reported-by: Da Xue Signed-off-by: Jagan Teki --- drivers/video/rockchip/rk_vop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/rockchip/rk_vop.c b/drivers/video/rockchip/rk_vop.c index ff1a80384d..3bae22a5bc 100644 --- a/drivers/video/rockchip/rk_vop.c +++ b/drivers/video/rockchip/rk_vop.c @@ -425,7 +425,7 @@ int rk_vop_bind(struct udevice *dev) { struct video_uc_platdata *plat = dev_get_uclass_platdata(dev); - plat->size = 4 * (CONFIG_VIDEO_ROCKCHIP_MAX_XRES * + plat->size = VIDEO_BPP32 * (CONFIG_VIDEO_ROCKCHIP_MAX_XRES * CONFIG_VIDEO_ROCKCHIP_MAX_YRES); return 0;