From patchwork Wed Jul 22 18:13:28 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 11680129 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 155986C1 for ; Thu, 23 Jul 2020 07:03:29 +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 E6A1320714 for ; Thu, 23 Jul 2020 07:03:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MQ+lxwAO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E6A1320714 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 D6E21892A5; Thu, 23 Jul 2020 07:03:15 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0CE4489F3B for ; Wed, 22 Jul 2020 18:14:01 +0000 (UTC) Received: by mail-ej1-x643.google.com with SMTP id f12so3233650eja.9 for ; Wed, 22 Jul 2020 11:14: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=+2yRql0PqZgjMLyfhyquRo9Q78YxnYMENZUh8aYO2bY=; b=MQ+lxwAOW3hhiw4GW1RPkyHjPo9/BRI+QBF7guB/qd5C5OnecF8OtmuxofFp16OQKy EMC7+3g2nf08aEbMghDQXRUvp0fzhowa/jIcH4uXJQcWIR+vhpTF7YBAWLdEqVTyRrxi nEhOKHX26y8VBaerO9+Gur87dZwtsRan/KUnWmIdLqMKDQ8IHg7GVLNx/MuIh/DBx4/i n+32kVouDv63jjHxIpv23Kk7as0nYKbP2vG5AJd9sjHS5i9a/4J9Xakc4RoidDus1kVc rMZAfP4oHMJ77Om9k45dDrjCZ9zAK2l+LCGC+Y+8IaIgcJpY13tGbBxu+8Xa1N+OB/Px rgZA== 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=+2yRql0PqZgjMLyfhyquRo9Q78YxnYMENZUh8aYO2bY=; b=b6Xf57vbqqdsWTWXUBDxyTRG5FOL09vC7vZLuMn9YLAduhEHtW0pqPKPeFpnDuoLpF 2Gk33/Bvk2Gp6srGJw7nXqVvPYyJycPH+Kd9g2DE5H0slynVcL01aLvhNb/r4DnySrgn mghX/TWGdAfDKOnrbfThjdLJ2ybbubY7joSUq/MDF30H/3rzgiKF86Ieg/zaQwIHNrP/ DOeHJTS2enIHDVSywJ/ONuxYLVAXPChUCGRPzrXhgOjw8r4JTvnY3CBL0lMf5CLL1uUH 2CE4OFFL1rs9+D5iocEbvnsZlzHfFTrCgTEPw5dCozbTyvwltj40Op0RD30DrM8z0dT/ K3nQ== X-Gm-Message-State: AOAM530lZm16hv/wFb+9VEf8OZEOTE1Ap88fWrj91i/Mfo6rAG8NeRZL 8WWq3oTudVmZ1w83Y7JQgkeSkHd4/w== X-Google-Smtp-Source: ABdhPJydtGJH1Wsx4NdMMVNpjKYL+ExfG/m+mBecCKK9gKXGYtqpdmrFWa/WLjRkpoXM2dmiBGmovw== X-Received: by 2002:a17:906:456:: with SMTP id e22mr811200eja.178.1595441639663; Wed, 22 Jul 2020 11:13:59 -0700 (PDT) Received: from localhost.localdomain ([2a02:810b:f40:e00:922b:34ff:fe38:6455]) by smtp.googlemail.com with ESMTPSA id x64sm372954edc.95.2020.07.22.11.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jul 2020 11:13:59 -0700 (PDT) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner_?= Subject: [PATCH v2 1/5] drm: rockchip: add scaling for RK3036 win1 Date: Wed, 22 Jul 2020 20:13:28 +0200 Message-Id: <20200722181332.26995-2-knaerzche@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200722181332.26995-1-knaerzche@gmail.com> References: <20200722181332.26995-1-knaerzche@gmail.com> X-Mailman-Approved-At: Thu, 23 Jul 2020 07:03:15 +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 , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 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,