Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp638105pxv; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzVR37hNtJy/E9sKC0RtCIlnZ83HmcqNL1+aRgZ5fZ8Oj0sAQMbE/W1pnKYHUZsrW0mp0x/ X-Received: by 2002:a50:a456:: with SMTP id v22mr3373189edb.333.1626376160185; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626376160; cv=none; d=google.com; s=arc-20160816; b=jzV0T5aGinv5LVsw3Vk1Q6ENwGi8+nvDUJt2xWE+qb8dcMaJIPgxqcAn7Np6+G4XZW fuMpSmRjVJvr48AZ2I0Fz4f8g6QosD86AISaKF9Zbc6kp3ZkhuAZRB9anCM288FAk6U1 toqtmIC19JzCFIwute40edA21L6FzHlJVDVOWj09jxuI/qKhaG8HvNyXCGtPyZT2K63Y 193OeuzfWjhaTvDUIRMBCeQVTG7w91ipHrXKH8LPZhn0MvP1RWLSMBg/PAd8mCO1sQxI YwFvKHAUhjUQNz3GsXdRu41Hi1ETGC4sRn36/Bjpj/tcyd7RbfBo1cd8OCOJgwiwgmev lxBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tk8l4ZngIm7lBugRcn2Mqh1q0itCI3ABOF92oCkUOno=; b=bmjINvNYzSF06eA9CbUqFdLm1uLMTZoIsYiKh7KRnvUprzTEEn6qxJQzqb+DpWo0jL q7HFrjHOWq6SlIpkK17MU98gtgPTYHKem+rKNGAmjWMgrlzzHT7Qw9X8TW04+Y+WTkjJ hZhfYIbmZURa0QQNs/ojYtzVzsOSKM9JCQaUklLl/RjpIY7y3RWdYhxWff07hecBEpoI e1BU5QKe2WWea/qP6HoIs493HCAZ6F/nNyKuM4Z2zGxD2NHsAX+7TUFjiifyZTP6ZQ1o 1bN95tVyD8jaryFrnz6lqyt4vOrQTq726v9Cz4XeY2fhzeUe88389zxBp03q3AoQuiQv LXyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="X/dERHbW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m19si3882131edd.297.2021.07.15.12.08.56; Thu, 15 Jul 2021 12:09:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="X/dERHbW"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243291AbhGOTJn (ORCPT + 99 others); Thu, 15 Jul 2021 15:09:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:35730 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241845AbhGOS6V (ORCPT ); Thu, 15 Jul 2021 14:58:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 897EF613DF; Thu, 15 Jul 2021 18:55:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1626375327; bh=fkdniDa+xDCETYQggD9oaebwsk6k8b5LwB+FE25nR24=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=X/dERHbWTMMVNgfLaJsP0+zWdXeimipbsqeyn7+XTr8TNt8HiQZTCBDKb/gGTiv+E XLR/GzSEIIo+s61wHqQh+Ag/2R0r+B8iuvwQZKXUMGbvZ/yGmG25pVB5yWpDEhRVmX II6K4ZNb98qwaWaO4VeRLXF2QFDRrugupbzlW6ow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Alex Bee , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.12 040/242] drm: rockchip: add missing registers for RK3066 Date: Thu, 15 Jul 2021 20:36:42 +0200 Message-Id: <20210715182559.093608165@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210715182551.731989182@linuxfoundation.org> References: <20210715182551.731989182@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Alex Bee [ Upstream commit 742203cd56d150eb7884eb45abb7d9dbc2bdbf04 ] 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 Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210528130554.72191-4-knaerzche@gmail.com Signed-off-by: Sasha Levin --- 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 b8dcee64a1f7..a6fe03c3748a 100644 --- a/drivers/gpu/drm/rockchip/rockchip_vop_reg.c +++ b/drivers/gpu/drm/rockchip/rockchip_vop_reg.c @@ -349,8 +349,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), @@ -361,13 +361,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), @@ -382,8 +381,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), @@ -408,6 +407,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[] = { -- 2.30.2