From patchwork Sat Jul 18 20:03:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11672015 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 516CA6C1 for ; Sat, 18 Jul 2020 20:03:55 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2ACE620717 for ; Sat, 18 Jul 2020 20:03:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="o3g4+Nkr"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="JuQsA+QX" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2ACE620717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=W/fTYautuvQFFaapU0xuVPlMbqXtMq0Mm9AE2EovEpQ=; b=o3g4+Nkrmr2qFZJs5d+gaENIu9 OxLXSylwWnNgnOdBT3l+kJTQg3IT9xNs97EI96LVI6itfsJJzIzgJWO2pEDTekQrPiDE8//Xzu5kO Lckwe4hKtt3RsiAwrXMz+fFr4DyxbVzhZD/cnqEcy5NvD9EGlebrhDeM4opXltEN52ifRGHtaLIYD rre/ZCfNHpVovFPBtLF2Uufey40PIOk3pm1lnPNPtE1P6YQrmTq2/U35wJ2muZOYLysBd2ffLxEZs 39yyxuzsrakkoCxXj6O6p5KkUwe6FH0b+s49STzgT7HinGt4mCe33w736g2SAYuKQsJZNJcwXNRUQ 7gPo5ECA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3m-0006gH-Oc; Sat, 18 Jul 2020 20:03:50 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3i-0006fa-Gy; Sat, 18 Jul 2020 20:03:47 +0000 Received: by mail-wr1-x444.google.com with SMTP id z2so14328505wrp.2; Sat, 18 Jul 2020 13:03:46 -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; bh=e9LVKzcKKE6KucRCr2Robwz6yGdDbDVXBxug85I0dco=; b=JuQsA+QXDag3MJEgFG3rsFkOpM4Bhb/3DNCULylpWsANJwn4NA6dd3s147xo7s3ey4 CFhsKGGd5G2FRuoiud12C7dQrOZ72rJ6oovlAyT9etUiHZ0OWXOmaueNe9+4npveWsrT moweQEz4L/kRQlpYWt6FNBL5LkEeEs6AbuiyGpUYVnm6+MsVxv60FIrQjZ2YhdEpi/eQ OUrBITlGULUJPme1h5xXXxpilsCgsnJGyaw0zwjmGMT2Bfdrsrk/zGuVNLXGuh+4kl3H El3o8cv9EgC9eaE//1JJDwfdQt66/Q0L7cJRi5d3RvMIKlV1Qds+r253cIdnHBLLZUQP dkYg== 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; bh=e9LVKzcKKE6KucRCr2Robwz6yGdDbDVXBxug85I0dco=; b=A9RxoTDUseIZxAK8JVuIP7f2QqjDEUq4xw6vTP15tSAtL8WMM0u7Wik64DRjIQvEIE /GGF9YFdJsYjKJU9XUm0t/Zc97x/XfK3pG2Zr4fPOGWz0B4GYD95JTd8xzGMgveRrFUw +A1U8Nt+23D563QwLS2kyYEno9wyFXEts3PVY43yD1GNqmkdqTZgDwE3GJbrlc6lAgva V66/gAD6BIwfJzqnbTW5JnmNlHiFIbgQu1FCk3ElVWbSMAczTBZsXiK3/QHKZE0YeZGX /v3EDa62YUKVra0yX0zo6906NUo0aHsj2/Wllh26sqspYl8v1VxGRm/wjaa2uTpqVWjw 1rbQ== X-Gm-Message-State: AOAM530Qrd9b60pY+XKC1BelaNMzOcPcyxuBXQfgcKIsv91bHNfe+XU8 jIdLzDQC5vBgjms7QA7bww== X-Google-Smtp-Source: ABdhPJy3upfHRf43wWELUIEzg31WQ4xhbjXcEWGM7mHkoHhDeFXRX0C4Y41yOPT/ghAcnDRL/vL+UQ== X-Received: by 2002:adf:ee05:: with SMTP id y5mr16157748wrn.185.1595102625416; Sat, 18 Jul 2020 13:03:45 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id l15sm21073826wro.33.2020.07.18.13.03.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 13:03:44 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH 1/5] drm: rockchip: add scaling for RK3036 win1 Date: Sat, 18 Jul 2020 22:03:19 +0200 Message-Id: <20200718200323.3559-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200718200323.3559-1-knaerzche@gmail.com> References: <20200718200323.3559-1-knaerzche@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_160346_613568_E01C85DE X-CRM114-Status: GOOD ( 13.11 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:444 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This patch adds register definitions needed to make scaling work on RK3036's win1. Signed-off-by: Alex Bee --- 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 Sat Jul 18 20:03:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11672017 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 353B113B6 for ; Sat, 18 Jul 2020 20:04:04 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0D52420717 for ; Sat, 18 Jul 2020 20:04:04 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="UK8cVfI4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="tQ66ff1l" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0D52420717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/cTOEfHrWuzxGqIUHJEVxrbpZElDSpeq5aqh/vg0yMA=; b=UK8cVfI4+FkPHvfCyKaLzBOVsH GbLu1Pa3YBSIJLOGIHH26C2FzYU/QDLaCOkMbnZ5dp4LGmh0xU+2LgXtDjZJeIBMz2pen/wM9n68h uVlUjMCBYxkvE12QQ64ZPp201uDEfe377jXLPxxGB22VOFLbUeePE5ZNVbuc80k3NAMxTUj5DyCtY uQAiQRZF3CVRTgABBaCAfYRKQrAAGNJp8B9UXtsgKdy+lse2VnLMprcJh8o1LiVqMeogG1lBJl8jf grvPR+9/rs0NJcYxTMXCBdGUvxDpHjARlCYASZKiKXLQDU9DepSuzJpKg6FgEa59yflyBzk5g98Od PFz48/7A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3v-0006mY-8y; Sat, 18 Jul 2020 20:03:59 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3o-0006gd-IS; Sat, 18 Jul 2020 20:03:53 +0000 Received: by mail-wm1-x341.google.com with SMTP id j18so18776280wmi.3; Sat, 18 Jul 2020 13:03:52 -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; bh=WoXFd0SV1/eqOnBq17jLxZ1E6FRJYzbrzrT0wsL/bTc=; b=tQ66ff1lLYZag32k5qkE2SZoAAjv8UkJZhytRTvdENmozmF4WUkJST6u9iOJRFzB5l hKTV/0yMr2gZih9mnWD3dr7Q/LVzCjNL7XbDrDaHRfsorJ8ZMCTamOuJZpKdAtYOEfSA prMlYUX1w7bm+OUaFr6Fl1jIl723J6oaLAqNWeLps9co51ppFzFX8Tsd9GiXOGf8h2CV Yg2hEImkW+NAqLMjXqBt1sqW06ttBcizxlYPWwMCZdQfrNccniGxAJ9UPlbONXpkH/bo HQSh2SZxsIPk7my30BMf41vfoHdZZA+DBNd1klWLCXI+8rq1Qd/BXmW2MeYuvkv0qfCM htxg== 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; bh=WoXFd0SV1/eqOnBq17jLxZ1E6FRJYzbrzrT0wsL/bTc=; b=sx/2Mpd1nLLIQQqS7D83bUtfbwA00J50UfkUoj7Sf+iY/Ii/clHdOK93QmAI/ReupK ovfTBJVEQkFg2uN3ilVZsnGkEaMq6vi+Drkjorya8wKbEvue3x12TXn2wWoKrZu7fkZF cCvgRscMojoU4t54wt+3OUtK78Gvv/vAE/Sf3IuSaAv2PjaBzP3lVPfD0VrZq3SPSdK5 DkppkgxVmftdoZoKDa54y/F+2jNPmHv92y39Hl5Q6casKebuobV8ThgHoflYNtTQpPm2 7gtA+DfvJ/LmXhHmQl8IoRIjUHlMo10HgStA28dRK+5OLQrUBpvvxgcBPP5TCunGQ0Ih 8sKA== X-Gm-Message-State: AOAM530+YW217tBwpqIx9ykxcZV30WtyRE/DUR4GsWMOs9FzBaPMaWRO +2+n2vsiQxinuPN0xp+csQ== X-Google-Smtp-Source: ABdhPJxsgMlbapRvQL6kbwNdmqeoS3ATi3VifOxmbtRfh2u4yxlMDxYRuBI3wpfEHIRgQ6BxT3goSw== X-Received: by 2002:a7b:c7d2:: with SMTP id z18mr15109002wmk.149.1595102631460; Sat, 18 Jul 2020 13:03:51 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id l15sm21073826wro.33.2020.07.18.13.03.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 13:03:51 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH 2/5] drm: rockchip: add missing registers for RK3188 Date: Sat, 18 Jul 2020 22:03:20 +0200 Message-Id: <20200718200323.3559-3-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200718200323.3559-1-knaerzche@gmail.com> References: <20200718200323.3559-1-knaerzche@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_160352_883441_BCDB04C1 X-CRM114-Status: GOOD ( 10.97 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org This patch adds dither_up, dsp_lut_en, data_blank and dsp_data_swap registers to enable their respective functionality for RK3188's VOP. Signed-off-by: Alex Bee --- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index b046910129fb..971a6bda7458 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -512,6 +512,10 @@ static const struct vop_common rk3188_common = { .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), + .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), + .dsp_data_swap = VOP_REG(RK3188_DSP_CTRL1, 0x1f, 26), }; static const struct vop_win_data rk3188_vop_win_data[] = { From patchwork Sat Jul 18 20:03:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11672019 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D6316C1 for ; Sat, 18 Jul 2020 20:04:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5558E20717 for ; Sat, 18 Jul 2020 20:04:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="wethWdqA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nVJlF96f" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5558E20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=I/Zs/Pguaz4IonjAC7DXyI+XmKmvJoue3GEUrRPDi90=; b=wethWdqAhUtcyfWWdlRr0Uk0cF 1MvNAoyoax6zNiZznYZTjMpGahyDhXdpTFVmCYIfB7OA4s3qLXRM5KYa97heRUBtpxSqnQzOs6AhA qTP1K5hvbiIE4Pv9eZ7WuZ1O/rFTi+uLM/On9RVkg6mbswfIU3HrKrHpewDxUb6iKp7BYKQjYQ07S CNorvuGxO9Zf04DMQbxJix9Bwv+Bk/T93AG2ZgObRDQtoSnmQPqTdJt40E5WTyQIteCVyskqw4anB +iNFdP3WH5Yeo/JJvU7C0IBkLxCBgKqmGvuVPHeBi+Wjn3e3v20NFwxhNlXSoQZzuKJ6J8cutrjtK Thg4Krug==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt45-0006rI-Kf; Sat, 18 Jul 2020 20:04:09 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3r-0006jw-Tj; Sat, 18 Jul 2020 20:03:56 +0000 Received: by mail-wm1-x341.google.com with SMTP id o2so21607951wmh.2; Sat, 18 Jul 2020 13:03:55 -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; bh=Up2eV2Vteg16fl3+BbUfcSIqvSuhZoqeniraZ8v2vhk=; b=nVJlF96fG6S4kr2LOkDNmL++aOy16kJ/Xk+UKzYE8FCRUDckFX0TRL5Z9vKoFb/Ht/ yPUTMkQIMzAOMAqFgs9sM48/xpajUVJU97MjXy7rNgrrUboVzXtZK34a+luIO8HZElOw BskKADeO5XSJQ975gidIXhXDXXksna7C9rjRwmpYNS5ftmyQHI3ZVxDZXfjeYTTu8km7 3CkLkbGEmwdjKQhKH6Jj8U2f4EY4sDQU3mCBKBts2TomIj6Hm3czGAvUiXqBtBULAp54 8gJE2OzaVBOe8EavswUthR8FEWpSAM3lwh54zb/qF1/l2QSnvbgCNfA8l7zwSORrhuOn TzBA== 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; bh=Up2eV2Vteg16fl3+BbUfcSIqvSuhZoqeniraZ8v2vhk=; b=HCQZ3+MPdfAuwPtE02dtw2DzupHq6C6J1JFEW3NBuz+O1ojlikQ4NXMIiBt6BFzUbz mAgKzL1B/rBm/ZGmn8J9UjshG8hNB5MWKuhIM3Ong54kduTNBxaFIMnDq/RS48QQS51k Q97nQ0CJE7QLtYzujiGtGnRainYhOUugti2HTLaGCQ68MyDXrBjsA1Os2dPZ4tyITXb7 bP1kcjmK+bCVzsun+ueBTy9rBa8HefWiIIgJubtDpR7pEaAgBmYjlJhrarfj4XvifeP1 uG8fC5pzIBUww6znt1UJCkjNRK/aDLBT4BS5c8ycWn9kRdQkrSH34/pxWNo3pFqOC4ay IYMg== X-Gm-Message-State: AOAM5327UbICzXgbc2B5NbSZxmww7+yJ+vUozlZxyW64wNq22cJUT3ej InuALCIaoYAhN8MGSheC8w== X-Google-Smtp-Source: ABdhPJxvinO92gTkDuYQ2dLK14Sgiv967YrakizlKBK83X1s8/QlBhaw49knldx24FPf0KohXbdsQA== X-Received: by 2002:a1c:2183:: with SMTP id h125mr15684545wmh.83.1595102635053; Sat, 18 Jul 2020 13:03:55 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id l15sm21073826wro.33.2020.07.18.13.03.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 13:03:54 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH 3/5] drm: rockchip: add alpha support for RK3036, RK3066, RK3126 and RK3188 Date: Sat, 18 Jul 2020 22:03:21 +0200 Message-Id: <20200718200323.3559-4-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200718200323.3559-1-knaerzche@gmail.com> References: <20200718200323.3559-1-knaerzche@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_160356_016724_7AC9C98B X-CRM114-Status: GOOD ( 13.01 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:341 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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. This patch adds the respective registers to make this work for those VOPs as well. Signed-off-by: Alex Bee --- 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 971a6bda7458..f2f9a9af39e3 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 = { @@ -381,6 +392,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 = { @@ -394,6 +407,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 = { @@ -476,6 +491,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 = { @@ -490,6 +508,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 Sat Jul 18 20:03:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11672021 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D10A46C1 for ; Sat, 18 Jul 2020 20:04:21 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 AA4BB20717 for ; Sat, 18 Jul 2020 20:04:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DTGYP5sT"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZspbZnDi" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA4BB20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=qcNGam1nSwryAiWK9Mxt0VGeyLJfG+DajnOZZp5nOfE=; b=DTGYP5sT3czj2wZYFGYif7evej JwHo3fGqttT7VmNFeDCisalbwE53DtRhnAX/eRkUn5t12in3gOshIXaSwj4Zc3L1Ufgwz4e0Gccca cejsVRphUcU2vs7UyQcoFTO2qDETCOGY4SFTQANSrL9n3LnlgUE+f8ergb6qEBbi1o4+MZnvzqC7w XcriynwO0eN3WufhNN3XRHbhv7WyPtKvgnXI8pVnaZnrGO2+29b1Ix0NzZWu1++f5x3axZO/mpLUc 4zzOrbiP8AENVzNqBH519xtncb4fzmsKotFzLAmOEROGYaApwATf6D78h7zQdi6F2AOZ4UbzJn8FL IXQePeYw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt4D-0006v3-FE; Sat, 18 Jul 2020 20:04:18 +0000 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt3w-0006mo-G1; Sat, 18 Jul 2020 20:04:01 +0000 Received: by mail-wr1-x442.google.com with SMTP id q5so14289226wru.6; Sat, 18 Jul 2020 13:04:00 -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; bh=c0T7Z0qYf9WUlRISQUZHhs4GcxCldWcEZuU3vNtYbek=; b=ZspbZnDizms9ElKXoiKKK5esxckOlsZE3C41L5ngf9htqd6fgAKb36noxHKmg5tB/c kElI64UCe6YUXG0tdG/YrPWsVnxJZM4MoUvHu3zrhT+Qz+F6vSjb/EKF75MB8scSIKIf fEYsgXPE+T3pT4lyd7+25nq7r480mVXS+BHKVr6WXzFvVp6menCcMvodBcD5KFZNnFTv /uk3MdlEphS1RlOixET0xsjPWbkL+Gs+RXNqDJYGdn+i/Ysn2mhN35H9MdlNjmpj+9jB QVU4HNok4nRFt+hqmotpFZqeah+WuOpfQnqxbvWRUMSlOgCTN3RrEnl6pTaqFoxEGLlj VMqA== 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; bh=c0T7Z0qYf9WUlRISQUZHhs4GcxCldWcEZuU3vNtYbek=; b=JF8F493ao5NedHdEN1VkRgqgrJHqgfb8GkjyQ2/wXDolm+Bq8dZXJ91APhluQB38s3 I1zjDDM24RLBp0TKG3RLBec2sue9e2Z/Jh0Ryl+SL01XafstC3wNJAuGzdz2d85Dmajx Ta7+O4EfQgGcXEZ/6RLndzkkCqAgWH3/c6xl/pWbbyWgodrBIbA0Uqd4ikMXquIdK1fB eHov9wM2mNyp993xfoTT+DEXAK0KApgU9DiPt6FSfMh/uBV8xSjgbDgEwfLyhku4pyVe c1cstTCGo3Ne5q0AM7QCkO0tjrc/LJPuJnbfFNMVQCl6RthdD90V8Yhlh1vBryihKVQV LK8A== X-Gm-Message-State: AOAM5330gVz02GAOVukzVvkZdBEZvNFhgM6A1UpabR/FaXwrpW/92CFa Cv/oYi8YYwkjPFNsqahxUw== X-Google-Smtp-Source: ABdhPJwTTkdbteurLJf8bTe6KQBo79DMHcPS1mzHuaTUrXsKp7gfNu8uVCge2iQB7FqFmqAViyAykw== X-Received: by 2002:adf:8091:: with SMTP id 17mr15006619wrl.13.1595102639229; Sat, 18 Jul 2020 13:03:59 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id l15sm21073826wro.33.2020.07.18.13.03.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 13:03:58 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH 4/5] drm: rockchip: set alpha_en to 0 if it is not used Date: Sat, 18 Jul 2020 22:03:22 +0200 Message-Id: <20200718200323.3559-5-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200718200323.3559-1-knaerzche@gmail.com> References: <20200718200323.3559-1-knaerzche@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_160400_618754_BF729CAC X-CRM114-Status: GOOD ( 12.90 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:442 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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 --- 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 c80f7d9fd13f..0f23144491e4 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1013,6 +1013,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); From patchwork Sat Jul 18 20:03:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11672023 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8A2836C1 for ; Sat, 18 Jul 2020 20:04:28 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 5BAFE20717 for ; Sat, 18 Jul 2020 20:04:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DU3AV3hE"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ne7cdRDd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5BAFE20717 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:To: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=+Fo1ehgymIujk06fV5G3+g4C5pp0aiy82Ss7rzGP9Pk=; b=DU3AV3hE0hCkPmpTynb2uhUFYY nM7ryTr072S36kl2VpyKUUSAdzp8FZbs2F9Pp92AO5gmR+EmV5NH8BWeUoNzbIUoiE0ShCegAzSmM XbISh32rzZJ9Ka9PUBMIWyaaNcJkr/UxP6VewzXbYNdNxjNoYVLkgGbpieqMcUGHTTEH8r29WlwW/ 7BUgZc/aoVmYjkt/dW62xTY/51O0vTvVvwwaUlBSjdKCZFSktYo9c0eP+WNe3ft1jahgUhMK99YGz PrJIHtQddkv6SKB1xv4MdhisE9gCeM38I8a/OLXjOvpA2TdJ4otwFbH5iJvjCeW7+MDOvN8Z26d68 UDCfW2ww==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt4L-0006yC-5i; Sat, 18 Jul 2020 20:04:25 +0000 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jwt40-0006p0-Uc; Sat, 18 Jul 2020 20:04:05 +0000 Received: by mail-wm1-x343.google.com with SMTP id c80so18790201wme.0; Sat, 18 Jul 2020 13:04:04 -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; bh=n3wmalXMf5RKdLRLN2Edh3BeBHa7ZnwIzM8k1DA3s8I=; b=ne7cdRDd09qgXdnFVUb/lT9/BuqLGPItDxnLgkv7cX0/mvBii4cFfQbmUZLzduYq/6 7s1F2WyE0DfQdHL9LRQ3w+SXHJZHudNgSrNlzDzP6rNJVSjGmKzqkI0Okiuh1Y+MpAwj NOo2VKijv3w4EBiZs6GIergq/76K2S6aj4xlGGQB9eggoNxVZO+Y2caT2sDVd+7wGMiF jcqsOSGE9J4OynScE+4OO7H5XAMbqzrYH9KsFHsTBBu2zV4zWyV+kB3KnmwwKwGStaWL GGLgHQ3Cd92TSwOhiXTxdAPm3D9TlxnMdwux/3IzID6gVlKnkJ/GZIq5+HvTUbjxpHGm cUaQ== 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; bh=n3wmalXMf5RKdLRLN2Edh3BeBHa7ZnwIzM8k1DA3s8I=; b=QZxwOycnN/O74EDBVRMC1XAR4zuw61BeGbqyZc06LUDYqqUl8EDy/Jl2WbgxHlw0fu ty546rirSB3Tbv5pE+uyyYdX228V6IGLFnvSP20pIhyyy9utxWafrMEiINyystWOTKxi 2lhYMLLZ/kRy+kAxEdfhk/9On5+RjufKfc7VpTCM99tu7rbhq2KZSOy/6gNGoSoTyfLs RU/EKiVlV+LnYVGxPuUT0LX/R0t27lgHpwTOngdiJ9vHAn5a4L68/gqUIV+9Ci5xxDU9 OwEjcAdn9P1/3GtEAbuwAHdx5P2AWvjnd8xKZI1B5QaUWuEDr8yfrVzF/JNcaOYtMHo7 INbQ== X-Gm-Message-State: AOAM531kW1eh2DzgJCLvoZMQmrH/B9qyGVOkWeVKhtMQIZWDELWk5Ic7 H7EAfoZ0Id9RGkjejnvc1g== X-Google-Smtp-Source: ABdhPJwdcwx43GlqCWVegzP07sgYkGwTpgWjf7cAPhoMDjs2HHlSuCYvAXYz9Ut+qF6WP+Sx7f3KlQ== X-Received: by 2002:a1c:6a13:: with SMTP id f19mr15709913wmc.106.1595102643612; Sat, 18 Jul 2020 13:04:03 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id l15sm21073826wro.33.2020.07.18.13.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Jul 2020 13:04:03 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH 5/5] drm: rockchip: use overlay windows as such Date: Sat, 18 Jul 2020 22:03:23 +0200 Message-Id: <20200718200323.3559-6-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200718200323.3559-1-knaerzche@gmail.com> References: <20200718200323.3559-1-knaerzche@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200718_160405_058602_0E826AB8 X-CRM114-Status: GOOD ( 13.17 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:343 listed in] [list.dnswl.org] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [knaerzche[at]gmail.com] -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Alex Bee , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, Daniel Vetter , linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org As stated in the comment for rk3288_vop_win_data windows that are supposed to be an overlay window are missused as HWC windows due to the missing implementation of that window type in VOP driver. This is also true for RK3036, RK3126, RK3188 and RK3228 VOPs which all have at least one dedicated HWC window (which are currently not definded in the driver). Since all of the mentioned VOPs have only one overlay window and all of them support alpha blending now it should be used as such, since this gives a much wider usage-perspective for them. Signed-off-by: Alex Bee Tested-by: Paolo Sabatino --- drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c index f2f9a9af39e3..756c580f206a 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -131,7 +131,7 @@ static const struct vop_win_data rk3036_vop_win_data[] = { { .base = 0x00, .phy = &rk3036_win0_data, .type = DRM_PLANE_TYPE_PRIMARY }, { .base = 0x00, .phy = &rk3036_win1_data, - .type = DRM_PLANE_TYPE_CURSOR }, + .type = DRM_PLANE_TYPE_OVERLAY }, }; static const int rk3036_vop_intrs[] = { @@ -200,7 +200,7 @@ static const struct vop_win_data rk3126_vop_win_data[] = { { .base = 0x00, .phy = &rk3036_win0_data, .type = DRM_PLANE_TYPE_PRIMARY }, { .base = 0x00, .phy = &rk3126_win1_data, - .type = DRM_PLANE_TYPE_CURSOR }, + .type = DRM_PLANE_TYPE_OVERLAY }, }; static const struct vop_data rk3126_vop = { @@ -543,7 +543,7 @@ static const struct vop_win_data rk3188_vop_win_data[] = { { .base = 0x00, .phy = &rk3188_win0_data, .type = DRM_PLANE_TYPE_PRIMARY }, { .base = 0x00, .phy = &rk3188_win1_data, - .type = DRM_PLANE_TYPE_CURSOR }, + .type = DRM_PLANE_TYPE_OVERLAY }, }; static const int rk3188_vop_intrs[] = { @@ -980,7 +980,7 @@ static const struct vop_win_data rk3228_vop_win_data[] = { { .base = 0x00, .phy = &rk3288_win01_data, .type = DRM_PLANE_TYPE_PRIMARY }, { .base = 0x40, .phy = &rk3288_win01_data, - .type = DRM_PLANE_TYPE_CURSOR }, + .type = DRM_PLANE_TYPE_OVERLAY }, }; static const struct vop_data rk3228_vop = {