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: 11679107 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 19C8D138A for ; Wed, 22 Jul 2020 18:15:29 +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 E4256207E8 for ; Wed, 22 Jul 2020 18:15: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="TQELlnQG"; 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 E4256207E8 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-arm-kernel-bounces+patchwork-linux-arm=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=pAfIbA0RfygfY0SrJJ5v9xQkDcK0yy5D2swDGLSoHcM=; b=TQELlnQG/79LG4Nc0Xkjs4YODd DYYrdI6qsE/3bvpOja3LIbTVKCWrbzWOxvnfggM0PygJHYavW9PyuLkva3OhBzos4piQvdf8aOlQn tHzS8M2QNNydM9um1Y1trs6+nc5g09HdASpur3UZYMGSBTQivdbDP42u6v36CGbVQ680IwjhEkxKe kD3ZenDtQR9hvk4jQSU49B2VT3cfnJiBL5VyuqGXTBxKXA944tkyQGM5dZuS0+OVveoAjDDb2cI8X 2Bn62uQxlUWc+JPIuBF5FnpJnL4nrIo2hpL1U8O8T8MPUdOmm1iiyqg6Ago+GZVbKgtBghYHBEnMs +asiY55w==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyJFk-0007Al-24; Wed, 22 Jul 2020 18:14:04 +0000 Received: from mail-ej1-x642.google.com ([2a00:1450:4864:20::642]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jyJFg-00079q-Vu; Wed, 22 Jul 2020 18:14:01 +0000 Received: by mail-ej1-x642.google.com with SMTP id n22so3260045ejy.3; 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=BB/7/q8vyEH8TRj0XgF/bq4RQAUhuZIqsPR8HC984vNdXHV8QInoLyUYsjKBkX1YpT Q6DMAhocjYqC0BSbhg3Y6vTqvGmn8B012AmrFKmMOZyY6RJ71EWfw4n1ZIu0AoUqDu3i okocmI22cx4HBcyW2zKw0jdsG3fzt7RlzYAjpPnSCNL/ZGacvawEV/TVyPyQYJr/ci0d n+816tgKTek/jQfmm+a8yDSYOhTO2XevTaRNH94bsyWuwqgCQCiwdpbzeScKpjWrcMeI R6VOJxrg+JzF5RbVNHo3JSs3RzIWER06o6K3rjeSN3Qu1pmI+miPHwZfx2a/SaCDiZ8D LNAg== X-Gm-Message-State: AOAM5307rMwFIKPeFrazUQSfnLEZLSlii+PWDmbR46hs2PX9nCaZjXVu W0dwdA4/4DrxzSqpwOaw/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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200722_141401_043748_71366952 X-CRM114-Status: GOOD ( 13.88 ) 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:642 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_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_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: 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-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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,