From patchwork Fri May 28 13:05:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12287845 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9BB17C4708E for ; Sat, 29 May 2021 10:14:17 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A59D610A2 for ; Sat, 29 May 2021 10:14:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A59D610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 89B306E161; Sat, 29 May 2021 10:14:12 +0000 (UTC) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by gabe.freedesktop.org (Postfix) with ESMTPS id D27FF6F5BC for ; Fri, 28 May 2021 13:06:15 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id z12so5365153ejw.0 for ; Fri, 28 May 2021 06:06:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=UbLfIFthjQtZlat7RQdN/8yMEDgpJIwnw/QpuFVzqeI=; b=E7bhan7NhUuVUJZuxUfPhvZxTg20U/P/6O1vrBdsdaL6+UjcvkjtNpH5Ouw2M61oq/ uCrsNHccZda3hmuSWGImGDMoetf+MXqY8I7qHmeKSj0rYmhYsTX3c0SADTxs+N5T253j FeLN0rT50121dOaZqRKF7xH9TqN1G5ZokSmm7BB/7YYikDeB5HGptZuz/0nNlnVmA1wU OP4tqM+ieLqZvPVvHxr4b86HX0ZcMfGIX45K7zABxJBSpu0oy+01sPe9n69J+P5V9Mpd DeHfmIKnF7jV64fWLBRNrembZ4KsUZ72hg5W95Ifa6iiwEX10YlSJdz9fwjhnvl2Pk3w iT5g== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=UbLfIFthjQtZlat7RQdN/8yMEDgpJIwnw/QpuFVzqeI=; b=GxlxEVbe9PfEebYQrQfhnLqlKlVB5DOQrzTMojenuTAQQUEXaf5MYJi6oGDV41Eb9B N0C6vC4/wgUNzRQNIA/H54ACDEpVkP+HgyaZtO6mXO8Wkq+MCHR+JgcQErgSQ3u+nhjS MpuQhjo9kuoEuugS8tdNLIQCi3sgrgAutSgiaWmq4hyhCXVdPgU9OKUyOi0VwS7fjfI7 ToJodv60/wKlnYRs0K8y3Ml4qH50nti3hJ/zhM8OhrR2WwLbeZazVkbYZ8ElhQyE8Vfz dD9TV2ICL/0sg/JHtHHKklz7L1FbgqJplE1Y5qqOvW5KQd31k66p96PAIWb1opfFNQmG N7lw== X-Gm-Message-State: AOAM533KAeSXL4fuq8UKmswQTHhiuwQ/GdChwLOacWu0v9vwgra4sSMu coEyMwL+sERyarqqwEwDXg== X-Google-Smtp-Source: ABdhPJzwwAQrY+FztbwSr53CEKhDkKAur6hWhbtxnRbmwG3xEJRjfGri3LkImQAzeg5HEwQJjikb5A== X-Received: by 2002:a17:906:7a13:: with SMTP id d19mr6110323ejo.69.1622207174527; Fri, 28 May 2021 06:06:14 -0700 (PDT) Received: from localhost.localdomain (ip4d17b4b8.dynamic.kabel-deutschland.de. [77.23.180.184]) by smtp.googlemail.com with ESMTPSA id u21sm2322778ejg.50.2021.05.28.06.06.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 06:06:14 -0700 (PDT) From: Alex Bee To: Sandy Huang , Heiko Stuebner , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 1/5] drm: rockchip: add scaling for RK3036 win1 Date: Fri, 28 May 2021 15:05:50 +0200 Message-Id: <20210528130554.72191-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210528130554.72191-1-knaerzche@gmail.com> References: <20210528130554.72191-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 May 2021 10:14:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add the registers needed to make scaling work on RK3036's win1. Signed-off-by: Alex Bee --- Changes in v2: - rephrase commit message drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index 80053d91a301..b046910129fb 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -77,15 +77,20 @@ static const uint64_t format_modifiers_win_lite[] = { DRM_FORMAT_MOD_INVALID, }; -static const struct vop_scl_regs rk3036_win_scl = { +static const struct vop_scl_regs rk3036_win0_scl = { .scale_yrgb_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 0x0), .scale_yrgb_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_YRGB, 0xffff, 16), .scale_cbcr_x = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 0x0), .scale_cbcr_y = VOP_REG(RK3036_WIN0_SCL_FACTOR_CBR, 0xffff, 16), }; +static const struct vop_scl_regs rk3036_win1_scl = { + .scale_yrgb_x = VOP_REG(RK3036_WIN1_SCL_FACTOR_YRGB, 0xffff, 0x0), + .scale_yrgb_y = VOP_REG(RK3036_WIN1_SCL_FACTOR_YRGB, 0xffff, 16), +}; + static const struct vop_win_phy rk3036_win0_data = { - .scl = &rk3036_win_scl, + .scl = &rk3036_win0_scl, .data_formats = formats_win_full, .nformats = ARRAY_SIZE(formats_win_full), .format_modifiers = format_modifiers_win_full, @@ -102,6 +107,7 @@ static const struct vop_win_phy rk3036_win0_data = { }; static const struct vop_win_phy rk3036_win1_data = { + .scl = &rk3036_win1_scl, .data_formats = formats_win_lite, .nformats = ARRAY_SIZE(formats_win_lite), .format_modifiers = format_modifiers_win_lite, From patchwork Fri May 28 13:05:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12287851 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 90DBCC4708E for ; Sat, 29 May 2021 10:14:23 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5308D610A2 for ; Sat, 29 May 2021 10:14:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5308D610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EB0556E174; Sat, 29 May 2021 10:14:12 +0000 (UTC) Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by gabe.freedesktop.org (Postfix) with ESMTPS id C65E86F5BC for ; Fri, 28 May 2021 13:06:16 +0000 (UTC) Received: by mail-ej1-x62b.google.com with SMTP id jt22so5247467ejb.7 for ; Fri, 28 May 2021 06:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HCinzeYxY1ACn5rVFsalymDNpiU4s0UULJ02Uf8Q/Xg=; b=fZyN+lO4LFqwFoO/0z3KNjFxtMLxQzWT8zoJyQ7UJJup0gRGyBHAsep+UMq5f4nWyc 0dp/kp10b0V7xAJFvPPLIO1dEti3HqArWKb/SZjPk4YqBwM2hTL6l5Ve5ptRtAng3zQE NN6cKmdmx/aOBVkXGJuxBRbsj/VBxffvNjhIhChQSMVXTN978VZqmTDXOqBhn0EOStkZ mJb56Mn7hS1E3IwqB22Nn9zm4hH6SAPO5xfaDFcprAnzYYd8unjZ5AWA0HHMukiyM7DZ FmBYvtR+wE/lHOm5Iym4enQmYTGcKS4A7Ze4u4IQW1kDyOL/lcndOEV7P2go2GNDIm4W /pXw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=HCinzeYxY1ACn5rVFsalymDNpiU4s0UULJ02Uf8Q/Xg=; b=nUTwz+k3/bZaoOBmy5aOh69TR77wnZmYSzJcTSTQL5tvjo0FgRrqF+BH7NPvKbhjwx Z2N4tZGxsiNjk0r2IVYdgLqgESnXFIl6jNrNjkOVJEqSJhqp1Sg5XCXfZgqfYEP+Bg5e kV1bGsQS6PoBY6GakyXZ59YLI4N1psBeNqx8sieLFRw+S9FZnZgwdttHKsc+HXXVh+x0 QqULwMpJUtfk8k1hK3HIq9dCrGOP+EnQg2zxOPMPY752kgkWLkRnXkfBF/2WMIfXljMG NwNBfCR9NKwyLkYXVGWZtd1iEsx55brMVKPsYwSWWsq0CrDkbYpnUkeruUjeNdkMTR60 R5GQ== X-Gm-Message-State: AOAM532HvRg5wyJv87EkqxYc9DR54xdIfZt8nCitwdSjcYCB7Y0y3Qa/ CM4owcCCunVIih4Ekr83WQ== X-Google-Smtp-Source: ABdhPJxTQMDcAVUJtuWxOiFDEOTvOyxEsGOfb0YMDTG/HlvUeVbiyINIs4BEhRPMAergrBzosF8RKw== X-Received: by 2002:a17:907:37b:: with SMTP id rs27mr9151356ejb.287.1622207175489; Fri, 28 May 2021 06:06:15 -0700 (PDT) Received: from localhost.localdomain (ip4d17b4b8.dynamic.kabel-deutschland.de. [77.23.180.184]) by smtp.googlemail.com with ESMTPSA id u21sm2322778ejg.50.2021.05.28.06.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 06:06:15 -0700 (PDT) From: Alex Bee To: Sandy Huang , Heiko Stuebner , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 2/5] drm: rockchip: add missing registers for RK3188 Date: Fri, 28 May 2021 15:05:51 +0200 Message-Id: <20210528130554.72191-3-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210528130554.72191-1-knaerzche@gmail.com> References: <20210528130554.72191-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 May 2021 10:14:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add dither_up, dsp_lut_en and data_blank registers to enable their respective functionality for RK3188's VOP. While at that also fix .dsp_blank register which is (only) set with BIT24 (same as RK3066) Signed-off-by: Alex Bee --- Changes in v2: - drop the not yet upstreamed dsp_data_swap and rephrase the commit message according drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index b046910129fb..2aa6d937a078 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -511,7 +511,10 @@ static const struct vop_common rk3188_common = { .dither_down_sel = VOP_REG(RK3188_DSP_CTRL0, 0x1, 27), .dither_down_en = VOP_REG(RK3188_DSP_CTRL0, 0x1, 11), .dither_down_mode = VOP_REG(RK3188_DSP_CTRL0, 0x1, 10), - .dsp_blank = VOP_REG(RK3188_DSP_CTRL1, 0x3, 24), + .dsp_blank = VOP_REG(RK3188_DSP_CTRL1, 0x1, 24), + .dither_up = VOP_REG(RK3188_DSP_CTRL0, 0x1, 9), + .dsp_lut_en = VOP_REG(RK3188_SYS_CTRL, 0x1, 28), + .data_blank = VOP_REG(RK3188_DSP_CTRL1, 0x1, 25), }; static const struct vop_win_data rk3188_vop_win_data[] = { From patchwork Fri May 28 13:05:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12287843 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24C9BC47082 for ; Sat, 29 May 2021 10:14:13 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BE104610A2 for ; Sat, 29 May 2021 10:14:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BE104610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0336C6E141; Sat, 29 May 2021 10:14:12 +0000 (UTC) Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2D3046F5BC for ; Fri, 28 May 2021 13:06:18 +0000 (UTC) Received: by mail-ej1-x629.google.com with SMTP id h20so5304573ejg.1 for ; Fri, 28 May 2021 06:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eRDj0MZVdTsSCC1Yf3hrs6Pt5+GzbpR4T0o/AaDM1so=; b=le92jVWjnEdA6redTACjRiKgL2NgrE87F0JvfHKsxfuifm2jTp16JBup34YX7nDupa qWQxUmK1nk8QhbJ6/SebSibILZ94srX5WDvugZRT7DePZBdqw1g8PLrgtov5U1tap8l6 PjOn4C0xkEBn/nGocm9U+4L0j/wz2XxqNRsS5pH25Hb3FuXvtKbpQ4vlX5AIURE4r3Tc tSkAN1LTdKD+GLcDqFVco0ni0pw276ndduPPVqtk/3tMLfZE/qVNJolEM8gPJ4D6vPYX dbYCGGCxKA//VzGHTJfKmGQECY0QxKajXc7LUJ3YyM/26QVdP09G8SJPyw6HPjNPoqnV IXyg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=eRDj0MZVdTsSCC1Yf3hrs6Pt5+GzbpR4T0o/AaDM1so=; b=LFvDxrv9QISPjBlXbyjObRnmkeXKoX4iESB5F4EN3M0uD1vp5vloojk2zfYX90f2cr IyaJYvzdxyD9K7HWZg6xdWmZu3sbd2Kxlttdp1O3fw+VC4eqU61pKoEPL8xZEM6Ow+Qz sJttQ05QCD9L7ThLipbSUjQVJoiI6MBM8OvjGzvBR8Hq8k4acGCNh6lUHnvShXTaNh1n NUntM6c70m2Ta8PFXrCwLOdb4gus8BbIQdWoiVDq+4r4qgtQTnTRoMsROII6GwpWpQmJ CJGKw1vjtV6rs3ru2z6BpqM6TqL7VsW/QtYNYr55nyzR1pxh7U4HLcKgCBLfa5L3wetJ F2mw== X-Gm-Message-State: AOAM531gF5vlG9GbEsFtb7IFriJvpVxIA4X0hgUt2eeZxZQM38IXA8jP 9Q0/63hVseKTiSxXpUWwpA== X-Google-Smtp-Source: ABdhPJzN2bFZQ/fRjfwL+SSSResnIJ4d7NrC0RuT1/aM7rHhN33jSvaMZPlKhuoDcWNeqB7on3W4+g== X-Received: by 2002:a17:906:4a5a:: with SMTP id a26mr9053546ejv.548.1622207176474; Fri, 28 May 2021 06:06:16 -0700 (PDT) Received: from localhost.localdomain (ip4d17b4b8.dynamic.kabel-deutschland.de. [77.23.180.184]) by smtp.googlemail.com with ESMTPSA id u21sm2322778ejg.50.2021.05.28.06.06.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 06:06:16 -0700 (PDT) From: Alex Bee To: Sandy Huang , Heiko Stuebner , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 3/5] drm: rockchip: add missing registers for RK3066 Date: Fri, 28 May 2021 15:05:52 +0200 Message-Id: <20210528130554.72191-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210528130554.72191-1-knaerzche@gmail.com> References: <20210528130554.72191-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 May 2021 10:14:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add dither_up, dsp_lut_en and data_blank registers to enable their respective functionality for RK3066's VOP. While at that also fix .rb_swap and .format registers for all windows, which have to be set though RK3066_SYS_CTRL1 register. Also remove .scl from win1: Scaling is only supported on the primary plane. Signed-off-by: Alex Bee --- Changes in v3: - added patch drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index 2aa6d937a078..b7c51933729f 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -355,8 +355,8 @@ static const struct vop_win_phy rk3066_win0_data = { .nformats = ARRAY_SIZE(formats_win_full), .format_modifiers = format_modifiers_win_full, .enable = VOP_REG(RK3066_SYS_CTRL1, 0x1, 0), - .format = VOP_REG(RK3066_SYS_CTRL0, 0x7, 4), - .rb_swap = VOP_REG(RK3066_SYS_CTRL0, 0x1, 19), + .format = VOP_REG(RK3066_SYS_CTRL1, 0x7, 4), + .rb_swap = VOP_REG(RK3066_SYS_CTRL1, 0x1, 19), .act_info = VOP_REG(RK3066_WIN0_ACT_INFO, 0x1fff1fff, 0), .dsp_info = VOP_REG(RK3066_WIN0_DSP_INFO, 0x0fff0fff, 0), .dsp_st = VOP_REG(RK3066_WIN0_DSP_ST, 0x1fff1fff, 0), @@ -367,13 +367,12 @@ static const struct vop_win_phy rk3066_win0_data = { }; static const struct vop_win_phy rk3066_win1_data = { - .scl = &rk3066_win_scl, .data_formats = formats_win_full, .nformats = ARRAY_SIZE(formats_win_full), .format_modifiers = format_modifiers_win_full, .enable = VOP_REG(RK3066_SYS_CTRL1, 0x1, 1), - .format = VOP_REG(RK3066_SYS_CTRL0, 0x7, 7), - .rb_swap = VOP_REG(RK3066_SYS_CTRL0, 0x1, 23), + .format = VOP_REG(RK3066_SYS_CTRL1, 0x7, 7), + .rb_swap = VOP_REG(RK3066_SYS_CTRL1, 0x1, 23), .act_info = VOP_REG(RK3066_WIN1_ACT_INFO, 0x1fff1fff, 0), .dsp_info = VOP_REG(RK3066_WIN1_DSP_INFO, 0x0fff0fff, 0), .dsp_st = VOP_REG(RK3066_WIN1_DSP_ST, 0x1fff1fff, 0), @@ -388,8 +387,8 @@ static const struct vop_win_phy rk3066_win2_data = { .nformats = ARRAY_SIZE(formats_win_lite), .format_modifiers = format_modifiers_win_lite, .enable = VOP_REG(RK3066_SYS_CTRL1, 0x1, 2), - .format = VOP_REG(RK3066_SYS_CTRL0, 0x7, 10), - .rb_swap = VOP_REG(RK3066_SYS_CTRL0, 0x1, 27), + .format = VOP_REG(RK3066_SYS_CTRL1, 0x7, 10), + .rb_swap = VOP_REG(RK3066_SYS_CTRL1, 0x1, 27), .dsp_info = VOP_REG(RK3066_WIN2_DSP_INFO, 0x0fff0fff, 0), .dsp_st = VOP_REG(RK3066_WIN2_DSP_ST, 0x1fff1fff, 0), .yrgb_mst = VOP_REG(RK3066_WIN2_MST, 0xffffffff, 0), @@ -414,6 +413,9 @@ static const struct vop_common rk3066_common = { .dither_down_en = VOP_REG(RK3066_DSP_CTRL0, 0x1, 11), .dither_down_mode = VOP_REG(RK3066_DSP_CTRL0, 0x1, 10), .dsp_blank = VOP_REG(RK3066_DSP_CTRL1, 0x1, 24), + .dither_up = VOP_REG(RK3066_DSP_CTRL0, 0x1, 9), + .dsp_lut_en = VOP_REG(RK3066_SYS_CTRL1, 0x1, 31), + .data_blank = VOP_REG(RK3066_DSP_CTRL1, 0x1, 25), }; static const struct vop_win_data rk3066_vop_win_data[] = { From patchwork Fri May 28 13:05:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12287863 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C5FBC47082 for ; Sat, 29 May 2021 10:14:36 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 576FE610A2 for ; Sat, 29 May 2021 10:14:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 576FE610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0611F6E84F; Sat, 29 May 2021 10:14:33 +0000 (UTC) Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by gabe.freedesktop.org (Postfix) with ESMTPS id E61656F5C0 for ; Fri, 28 May 2021 13:06:18 +0000 (UTC) Received: by mail-ej1-x634.google.com with SMTP id ci15so1875809ejc.10 for ; Fri, 28 May 2021 06:06:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=MW0JHxZuI2Zb8ESdRdSCjrHhcXSDEM8LLD+9HCmxueM=; b=NXyErXuuCFvYRyHv6PKtelWFJwX0pCLLtkw1Ax6t9V++bMU/W+XsKExHHRhBYUm+VB MF3SzFEmpTW6qfvLm6hyYCD5o0f/a/NyevjTVrFtlbLUvSx2cAyZwU0XPUqltZQF8wfY IyUyDgPj34Jh/YbThZpknN8bYfFMf3sLRKdmfOmNIhcUW48zXbDZKT1hiKTdR96dZDpU 83DlAnMQGDHfviEAFYTp24vy4UAdCFz5mncNgutp3rOnkrzCzDxEhiSQg7vjws9y9zBb /071FQz5gbcD4LDAUN7+6Ydf33ZpG/OE6mCIB76x3o4vLh6bYWvFcQmkhFvBX3zFdFDJ IvGg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=MW0JHxZuI2Zb8ESdRdSCjrHhcXSDEM8LLD+9HCmxueM=; b=oNGvmv3BaUtqknt3jQdS87/cyzPYfHhTwyHlDZBdd7mRXJD/I3Y/UaNerSnQfpwwUf ED8VcqRLKNKFCNdUbw/cmluGzNzFca0dtqCK5zHQMA8zqGP4BNE68RWx+VnKaUjJDTlo Xn9+IPBz0uEDxeweJ4eqKImMXlxAcSp3vPYNLpJOjdkfa0xWhg+bz8FmLP7hsCYzSgFB Ay9cG/qQTVP6ANQWMYOPoMNIvwk5YIuIiFaR1kmg8/7XrNggGA0iuAotCFKke8Srlvej zVuol10MtEgz0hZVkGQjF0DV1RjlIOKY94ClpsKd7NrPRJbpFV8ncc8C5miMxoFszuOV CREQ== X-Gm-Message-State: AOAM533ToM9bxUK/lsTRb4UD4H3PS8e7V837XOB535SRCgbxB/9dsm3o +YHcZeHGGuYjEmQv2QSYDQ== X-Google-Smtp-Source: ABdhPJz+OvGcA2tPJTL3NpUU85LDUV0aYC2bpveQ4Mp2vRSX+6IkJuQMfvbFfJzASrEuYymoVJNqvA== X-Received: by 2002:a17:906:7c52:: with SMTP id g18mr1882298ejp.420.1622207177464; Fri, 28 May 2021 06:06:17 -0700 (PDT) Received: from localhost.localdomain (ip4d17b4b8.dynamic.kabel-deutschland.de. [77.23.180.184]) by smtp.googlemail.com with ESMTPSA id u21sm2322778ejg.50.2021.05.28.06.06.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 06:06:17 -0700 (PDT) From: Alex Bee To: Sandy Huang , Heiko Stuebner , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 4/5] drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 Date: Fri, 28 May 2021 15:05:53 +0200 Message-Id: <20210528130554.72191-5-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210528130554.72191-1-knaerzche@gmail.com> References: <20210528130554.72191-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 May 2021 10:14:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" With commit 2aae8ed1f390 ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP") alpha support was introduced for PX30's VOP. RK3036, RK3066, RK3126 and RK3188 VOPs support alpha blending in the same manner. With the exception of RK3066 all of them support pre-multiplied alpha. Signed-off-by: Alex Bee --- Changes in v2: - rephrase commit message drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 21 +++++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_vop_reg.h | 1 + 2 files changed, 22 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index b7c51933729f..4d18b42f522b 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -104,6 +104,9 @@ static const struct vop_win_phy rk3036_win0_data = { .uv_mst = VOP_REG(RK3036_WIN0_CBR_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3036_WIN0_VIR, 0xffff, 0), .uv_vir = VOP_REG(RK3036_WIN0_VIR, 0x1fff, 16), + .alpha_mode = VOP_REG(RK3036_DSP_CTRL0, 0x1, 18), + .alpha_en = VOP_REG(RK3036_ALPHA_CTRL, 0x1, 0), + .alpha_pre_mul = VOP_REG(RK3036_DSP_CTRL0, 0x1, 29), }; static const struct vop_win_phy rk3036_win1_data = { @@ -119,6 +122,9 @@ static const struct vop_win_phy rk3036_win1_data = { .dsp_st = VOP_REG(RK3036_WIN1_DSP_ST, 0x1fff1fff, 0), .yrgb_mst = VOP_REG(RK3036_WIN1_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3036_WIN1_VIR, 0xffff, 0), + .alpha_mode = VOP_REG(RK3036_DSP_CTRL0, 0x1, 19), + .alpha_en = VOP_REG(RK3036_ALPHA_CTRL, 0x1, 1), + .alpha_pre_mul = VOP_REG(RK3036_DSP_CTRL0, 0x1, 29), }; static const struct vop_win_data rk3036_vop_win_data[] = { @@ -185,6 +191,9 @@ static const struct vop_win_phy rk3126_win1_data = { .dsp_st = VOP_REG(RK3126_WIN1_DSP_ST, 0x1fff1fff, 0), .yrgb_mst = VOP_REG(RK3126_WIN1_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3036_WIN1_VIR, 0xffff, 0), + .alpha_mode = VOP_REG(RK3036_DSP_CTRL0, 0x1, 19), + .alpha_en = VOP_REG(RK3036_ALPHA_CTRL, 0x1, 1), + .alpha_pre_mul = VOP_REG(RK3036_DSP_CTRL0, 0x1, 29), }; static const struct vop_win_data rk3126_vop_win_data[] = { @@ -364,6 +373,8 @@ static const struct vop_win_phy rk3066_win0_data = { .uv_mst = VOP_REG(RK3066_WIN0_CBR_MST0, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3066_WIN0_VIR, 0xffff, 0), .uv_vir = VOP_REG(RK3066_WIN0_VIR, 0x1fff, 16), + .alpha_mode = VOP_REG(RK3066_DSP_CTRL0, 0x1, 21), + .alpha_en = VOP_REG(RK3066_BLEND_CTRL, 0x1, 0), }; static const struct vop_win_phy rk3066_win1_data = { @@ -380,6 +391,8 @@ static const struct vop_win_phy rk3066_win1_data = { .uv_mst = VOP_REG(RK3066_WIN1_CBR_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3066_WIN1_VIR, 0xffff, 0), .uv_vir = VOP_REG(RK3066_WIN1_VIR, 0x1fff, 16), + .alpha_mode = VOP_REG(RK3066_DSP_CTRL0, 0x1, 22), + .alpha_en = VOP_REG(RK3066_BLEND_CTRL, 0x1, 1), }; static const struct vop_win_phy rk3066_win2_data = { @@ -393,6 +406,8 @@ static const struct vop_win_phy rk3066_win2_data = { .dsp_st = VOP_REG(RK3066_WIN2_DSP_ST, 0x1fff1fff, 0), .yrgb_mst = VOP_REG(RK3066_WIN2_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3066_WIN2_VIR, 0xffff, 0), + .alpha_mode = VOP_REG(RK3066_DSP_CTRL0, 0x1, 23), + .alpha_en = VOP_REG(RK3066_BLEND_CTRL, 0x1, 2), }; static const struct vop_modeset rk3066_modeset = { @@ -478,6 +493,9 @@ static const struct vop_win_phy rk3188_win0_data = { .yrgb_mst = VOP_REG(RK3188_WIN0_YRGB_MST0, 0xffffffff, 0), .uv_mst = VOP_REG(RK3188_WIN0_CBR_MST0, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3188_WIN_VIR, 0x1fff, 0), + .alpha_mode = VOP_REG(RK3188_DSP_CTRL0, 0x1, 18), + .alpha_en = VOP_REG(RK3188_ALPHA_CTRL, 0x1, 0), + .alpha_pre_mul = VOP_REG(RK3188_DSP_CTRL0, 0x1, 29), }; static const struct vop_win_phy rk3188_win1_data = { @@ -492,6 +510,9 @@ static const struct vop_win_phy rk3188_win1_data = { .dsp_st = VOP_REG(RK3188_WIN1_DSP_ST, 0x0fff0fff, 0), .yrgb_mst = VOP_REG(RK3188_WIN1_MST, 0xffffffff, 0), .yrgb_vir = VOP_REG(RK3188_WIN_VIR, 0x1fff, 16), + .alpha_mode = VOP_REG(RK3188_DSP_CTRL0, 0x1, 19), + .alpha_en = VOP_REG(RK3188_ALPHA_CTRL, 0x1, 1), + .alpha_pre_mul = VOP_REG(RK3188_DSP_CTRL0, 0x1, 29), }; static const struct vop_modeset rk3188_modeset = { diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.h b/drivers/gpu/drm/rockchip/rockchip_vop_reg.h index 6e9fa5815d4d..0b3cd65ba5c1 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.h +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.h @@ -955,6 +955,7 @@ #define RK3188_DSP_CTRL0 0x04 #define RK3188_DSP_CTRL1 0x08 #define RK3188_INT_STATUS 0x10 +#define RK3188_ALPHA_CTRL 0x14 #define RK3188_WIN0_YRGB_MST0 0x20 #define RK3188_WIN0_CBR_MST0 0x24 #define RK3188_WIN0_YRGB_MST1 0x28 From patchwork Fri May 28 13:05:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 12287857 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB1F4C4708E for ; Sat, 29 May 2021 10:14:31 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 80987610A2 for ; Sat, 29 May 2021 10:14:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80987610A2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F059A6E162; Sat, 29 May 2021 10:14:30 +0000 (UTC) Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by gabe.freedesktop.org (Postfix) with ESMTPS id C365C6F5C0 for ; Fri, 28 May 2021 13:06:19 +0000 (UTC) Received: by mail-ej1-x62c.google.com with SMTP id jt22so5247689ejb.7 for ; Fri, 28 May 2021 06:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=hXF0Ts56dwHAndcdIXFBR1E/2W75Wukvn1BbkoOuP3s=; b=GIzRpEPP+mEiI+M7ckcQ/slkmUTYqGmhOGTej6PmDuhSzka2kqH41IB1DFJenbMi1c 08ibSUvl0mnhV5YWffgTXeQY/b0mHGuEu9whZc1J8WyOhUjtY2A53tENr4RfRImNGeOq 2yL9aS0/uLvlnXr360MhMjytDsjv2kx3XiDZyE0BbjV8SfSGEei9HI7z6TzuDZjdPFz9 QaHGCreUCG2Ux1fw/Rw9V3FnaHFjh2tXXm4HpAX+lyYSiwqwbby+gKK0vbxl4YYkW8+2 k0HLuqj+NOf746VAW2+sOEsWj2t7Udi/sgeFq1XS3ZMQQSsQtb64NL7bpGRV9vzQ5ZTq 0kNw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=hXF0Ts56dwHAndcdIXFBR1E/2W75Wukvn1BbkoOuP3s=; b=GnursUaSvSxGeKiF/WBN/68uFlFBqS7x6PAvhEKFwHg2EIpn0dCm/AW+BJwHADmAHg lpj7ZHzC7NeGKOmPDIDKhuK3ATUhkM0DlH7SUQY8GYDrq1mmZVmSQi/BF51SdQARWctn b62yNTsQJxu3ww7O5SRZeTQL4XARvU5qKkQfdNYOzw+xTt39T+JLtPglAuJZliGVk7Jn Jh1wtMYnBIjA8svn7XOM6I59LDCRqDf9v1GixEnBd5R4PTQEjKokFtiqBZY3mX1QorSl OGKQmhzMI1LRKB/qDT0DOrFvtDpDOs5oNkiNLVFQjjZvJdEznPl63Y9C4syvYYdbBXrI kmuQ== X-Gm-Message-State: AOAM531E1We3lnQoCw7aHotN4bYT984EY5c5mL5IXyUqMu44Dthm/+uQ FHZ0AbtI20nGofe+XqjKtkmgfRReQUO7 X-Google-Smtp-Source: ABdhPJybEOzv6Dmyb9n/L+ylVeUxGip+f0N75LsX5IiJGN1MgjT0EIL2I29E+yM3bVVb6uPrQgTgeQ== X-Received: by 2002:a17:906:1796:: with SMTP id t22mr3529966eje.304.1622207178511; Fri, 28 May 2021 06:06:18 -0700 (PDT) Received: from localhost.localdomain (ip4d17b4b8.dynamic.kabel-deutschland.de. [77.23.180.184]) by smtp.googlemail.com with ESMTPSA id u21sm2322778ejg.50.2021.05.28.06.06.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 May 2021 06:06:17 -0700 (PDT) From: Alex Bee To: Sandy Huang , Heiko Stuebner , Paul Kocialkowski , dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org Subject: [PATCH v3 5/5] drm: rockchip: set alpha_en to 0 if it is not used Date: Fri, 28 May 2021 15:05:54 +0200 Message-Id: <20210528130554.72191-6-knaerzche@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210528130554.72191-1-knaerzche@gmail.com> References: <20210528130554.72191-1-knaerzche@gmail.com> MIME-Version: 1.0 X-Mailman-Approved-At: Sat, 29 May 2021 10:14:11 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" alpha_en should be set to 0 if it is not used, i.e. to disable alpha blending if it was enabled before and should be disabled now. Fixes: 2aae8ed1f390 ("drm/rockchip: Add per-pixel alpha support for the PX30 VOP") Signed-off-by: Alex Bee --- Changes in v2: - capitalize "F" of "Fixes" in the commit message drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 64469439ddf2..f5b9028a16a3 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1022,6 +1022,7 @@ static void vop_plane_atomic_update(struct drm_plane *plane, VOP_WIN_SET(vop, win, alpha_en, 1); } else { VOP_WIN_SET(vop, win, src_alpha_ctl, SRC_ALPHA_EN(0)); + VOP_WIN_SET(vop, win, alpha_en, 0); } VOP_WIN_SET(vop, win, enable, 1);