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: 1316296 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=DcJdxP1i; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49sRfP1h6rz9sQx for ; Thu, 25 Jun 2020 01:20:12 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 679AF82064; Wed, 24 Jun 2020 17:19:14 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="DcJdxP1i"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 2C9C682069; Wed, 24 Jun 2020 17:19:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,T_SPF_HELO_TEMPERROR,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-pf1-x443.google.com (mail-pf1-x443.google.com [IPv6:2607:f8b0:4864:20::443]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id CBCF98205C for ; Wed, 24 Jun 2020 17:19:03 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=jagan@amarulasolutions.com Received: by mail-pf1-x443.google.com with SMTP id f9so1311885pfn.0 for ; Wed, 24 Jun 2020 08:19:03 -0700 (PDT) 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; bh=GMpGZV1WTtFiM81w8xoa+rMVHgxOdmU80VRlV29Io2Y=; b=DcJdxP1i1W6N2e3avuSUsjs38CC43ZmBm6C0fsjvRLxsH6zU1QDjtI6D78Z3Illpb0 ilDvTn//iaKNDRHGuvECryZUPTs5q3udMJIKlizefwkqyNMaLX8nSbB8CCWSvuGIIIKQ ZUpBoVyAWaDyRZZyT80g+VPCP8+/GrbWJ7AJs= 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; bh=GMpGZV1WTtFiM81w8xoa+rMVHgxOdmU80VRlV29Io2Y=; b=h5Ue3+dJmGxThHbdd924erZlWjBzZuxMt2aBUZC7NptNgR5jm71N+EPUUHD7mSgopr 0g/vLRG4BN+77VV2dwNoMFlBDjE1Tfh9CuZl4mrHMSOFd56js45ID6/sKbKwYc/2Iu5E yMXc5Nn34PfYrjGyX52yLXMvzNvcCzdFUyYO7/NQrWmkV1sfFxXvZ3vTt5gLHgjR0cz0 LlPB1POX8iqmkYFzDq9sTyk3/tMqZjGFE9kPFUkhCCaRAkitgE/E1y0qSHV0LPmIuCP1 HOUoh8hdgoliVg/dXlxHDrKyHm6mpFNnDtB1vIQaYJQWFDkIrRSzZrFjN0534WCrX04G S3Xw== X-Gm-Message-State: AOAM531BLBbCl9mbK6BY7xdeuh+hkx4Pkys6WUUjes0asfwyWm/QrWjg ivi9OsVq6xDY1ZvH8tsTa7cSvg== X-Google-Smtp-Source: ABdhPJyQ9VL4VSLtiELu0yQGFen83UCncoe3mgNiPcLFkQJPSBzgyy0L6BrQ/lkqygU4hOfXqCnHdA== 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 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.102.2 at phobos.denx.de X-Virus-Status: Clean 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;