From patchwork Sat Mar 18 19:45:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leonard Lausen X-Patchwork-Id: 13179963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F28BCC7618E for ; Sat, 18 Mar 2023 19:45:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbjCRTpK (ORCPT ); Sat, 18 Mar 2023 15:45:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57476 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229488AbjCRTpJ (ORCPT ); Sat, 18 Mar 2023 15:45:09 -0400 Received: from devico.uberspace.de (devico.uberspace.de [185.26.156.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 468AD23664 for ; Sat, 18 Mar 2023 12:45:08 -0700 (PDT) Received: (qmail 32315 invoked by uid 990); 18 Mar 2023 19:45:06 -0000 Authentication-Results: devico.uberspace.de; auth=pass (login) MIME-Version: 1.0 Date: Sat, 18 Mar 2023 19:45:05 +0000 From: "Leonard Lausen" Message-ID: Subject: [PATCH] drm/msm/dpu: Add support for AR30 format To: robdclark@gmail.com, quic_abhinavk@quicinc.com, dmitry.baryshkov@linaro.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org X-Rspamd-Bar: --- X-Rspamd-Report: BAYES_HAM(-2.999999) MIME_GOOD(-0.1) X-Rspamd-Score: -3.099999 Received: from unknown (HELO unkown) (::1) by devico.uberspace.de (Haraka/3.0.1) with ESMTPSA; Sat, 18 Mar 2023 20:45:06 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=lausen.nl; s=uberspace; h=from; bh=mMAvDOgPzRoHk+xlo6UuvhlBsy65oeD4+ECW73EB0gA=; b=khcb2mcdY+hPWv6mELQTyxizkFo7JHNhniw+Fh+fCRHQeA1DTerPCHUHpqo4pUZk11PHMMj7WN nDbcVoVUkuvi1cpaojPwxdLDaBy0mBlbxuBtQz6FG8x1ysU2yXzK/8zfwQ3cVoPHpHvXh/ultU+r BJH5mKvHa355BwL4MbGN7MIVxs2h7tFosfYMi6GOdkLXV6n7Ci00Efe9/XH0sUUkJssytmMfNV+u XhxvdP8GVI/eXLNSHOM9U1ZQaxBTXA2x/tSwZ2BSGtx1cnGbD5rcvFS76Whx+KjJVXOBIBE0ocsb SpQvT0bDCWeKoCgiqqHZd16348o3YOaYluB+k59DI7Q6Z3kbwVoGVSWvqh0txTBBdEimatdKp7MC gl6EcGhH5n4HPogz7Cb/ou1dJDM69E4em/mI4WydyqnTauTKMu1uWOrsHpTGVIgcsDw51cHMF66m 9qUB/RSUv2/GaDuO+HfbhmfTbxsa3bwIgrCuY5rQIIa4quegq6n+r4vcpw3YY2MyCufe0BPkNYAG wyqX9bTw05529RT6PILwvXjXFGerLeRXYqUrju3gMwhORE9hi+L8qgVZ92XcFhGZ15mf+vfyG7jn 4W3ivq3ClLt4hgJvRIwDFmneA08d+Z81+IS1fAo1r4A3UzUaYebJuNkwOxzm8FWNmck2r2XhcYRK A= Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Commit da7716a249b699978fb5 ("drm/msm/dpu: Add support for XR30 format") enabled support for the 10-bit XR30 color format but missed AR30 color format. This can trigger bugs in userspace. KDE KWin compositor for example always prefers 10-bit color formats, rendering a 1cm^2 black box around the cursor due to missing per-pixel alpha-blending if only XR30 but not AR30 support is declared. Signed-off-by: Leonard Lausen Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c | 2 ++ drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 1 + 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c index 83f1dd2c22bd..d99ce3919248 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c @@ -156,6 +156,7 @@ static const uint32_t plane_formats[] = { DRM_FORMAT_RGBX8888, DRM_FORMAT_BGRX8888, DRM_FORMAT_XBGR8888, + DRM_FORMAT_ARGB2101010, DRM_FORMAT_XRGB2101010, DRM_FORMAT_RGB888, DRM_FORMAT_BGR888, @@ -185,6 +186,7 @@ static const uint32_t plane_formats_yuv[] = { DRM_FORMAT_RGBA8888, DRM_FORMAT_BGRX8888, DRM_FORMAT_BGRA8888, + DRM_FORMAT_ARGB2101010, DRM_FORMAT_XRGB2101010, DRM_FORMAT_XRGB8888, DRM_FORMAT_XBGR8888, diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c index bfd5be89e8b8..0ed6a1a114c7 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c @@ -69,6 +69,7 @@ static const uint32_t qcom_compressed_supported_formats[] = { DRM_FORMAT_ARGB8888, DRM_FORMAT_XBGR8888, DRM_FORMAT_XRGB8888, + DRM_FORMAT_ARGB2101010, DRM_FORMAT_XRGB2101010, DRM_FORMAT_BGR565,