From patchwork Wed Aug 14 18:46:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171334 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp1202985ily; Wed, 14 Aug 2019 11:47:16 -0700 (PDT) X-Received: by 2002:a63:62c6:: with SMTP id w189mr500125pgb.312.1565808436680; Wed, 14 Aug 2019 11:47:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565808436; cv=none; d=google.com; s=arc-20160816; b=Od0EyxbxGtcSx5ID3phDZpvN8xvysiwH2yqVSCGjwuAGttTIWh6RS0zMXOBYiZq/As 60qUgzEthOFPha0X7PuMQMwLvgdYkcNgtaPeZtflOAmPF+s1d5Z6PymkZdl+TEEwkVcc EgOe8sb8l+pRbPJsUlKK1rBEw0dxzmOra3KaF1FC7PTBwF06FXbjPq2sm7iqPmX4P0wu TO48RvmmUvfQyWy3yy29w6WXWpWMuNdBFtMLAtMagrLkKxaslRrhGqsqSU6BLE+dChFE BcAsXWMCo2/wXMkgVbg2vDENgFpNSpL3+t/vZHF3evwF53LOJ0CQi1KiILrdvFrIvQwE rQew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=mTsaQr/BGfn/0oGZCU1NOuvNsQeVfs5BZ0y5MQK4HZo=; b=dge93KsxUW11J4R0EX2w/P7eiDuZ3iSORAnuUqx4N3EGHq5tDcif4Esmkd1+KJKz2O OwtFHieAVXcLo0HPwZBLKIK/7w3J/BWiIKcI11KVJP2EL4pKRE96erLIOeLo86SfgfNp knK5UeWuojRqRS2eqjo5Ny/RoVHuKw7SoxlwfIkiH0H0/w40Tt1BY9CPQ1Rr1FF8d07D +LB4YLSRQzj9uOxd3a0LTeyDZZkWkgLwTVQbMvCtt7qss3h8C8IjqJEbRCvYzMwlJkz3 rIQZ13Fa0JrWrqkKosOT4YnBKamf0bIPU4DZ5aYG1m+P2ooPSUmiaTqYUf2SBPWGmCcU RojA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3DL2zju; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id i20sor596980pfa.12.2019.08.14.11.47.16 for (Google Transport Security); Wed, 14 Aug 2019 11:47:16 -0700 (PDT) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=o3DL2zju; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=mTsaQr/BGfn/0oGZCU1NOuvNsQeVfs5BZ0y5MQK4HZo=; b=o3DL2zjuNDIUowRC65Y7G85lgkhRHxMh346JtwhfodzRxGUaYUKU+thJCSJsBe4WJi o7jmKjTDOR/IWLt4CEvdDBzJbCiK0WShw5JO4BzYTiMAqvi7HWFu5LYCg6b2i0126Fxm r5ZWEFL1w8WnqZj3ws34aNLYNJa1AdQPUI37trOnmxNtOVF83WFeJ6eLezTeE0zZ+AlO fE5d4qz1P03Cz5hCnJ56goR/ZbBos3YU7jph+HMsObrsY3og0t20I7qPD0xApbiUluqI GoH4QvAomVPnLnwvhXcLrPsEC2olYCDvoAdTpAYx2C8v1zSx97YBTjrhanjp7IytNT/6 5V6A== 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=mTsaQr/BGfn/0oGZCU1NOuvNsQeVfs5BZ0y5MQK4HZo=; b=sq3fKA0bmopbn+UXIizSZsXQvH6sgsqyrXtccgoD2oiL71X8K2UJDNu9CdmXNX2Ty/ rOxq4+0TIhepdIwsRnwkXxFWCt15mg9U9FCVrftSHnTY52Z8DABgBQb0fg48esF5U2Mm kkLVe7A8TmJh0BmeL4wgMY73Zk32QcKPxsYFhqzdiYg1luIfUILmtgnBD1j1BciP416z oLErodA9QvlHioWTwDO/hEO0j8RQzaZvsOlj5bRjT38MNBWd7k6Sepv5mPDh9SlTx8UI H028b5uxBWYVAvlpWcP9K5jURdFfdqPS1J3toHxrB1L3fH2bd9RTlH1gKk0GJYYK2q0l Q/dg== X-Gm-Message-State: APjAAAUagBLduVG/S9t8UuaJugDQC+dqWs7O88ceSKikkVfhSP0fIg4C WLKeJvxSm8VlyoICgbS+16aynKiA X-Google-Smtp-Source: APXvYqz9sWuMrYnJ71oWGt4PPF5S0nMvyCRFGdTZmp2X1HPVn5mbdmlna+I0NEyr5eJPDQFLrW3tHw== X-Received: by 2002:aa7:90c9:: with SMTP id k9mr1332133pfk.171.1565808436316; Wed, 14 Aug 2019 11:47:16 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id y16sm610855pfc.36.2019.08.14.11.47.14 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 14 Aug 2019 11:47:15 -0700 (PDT) From: John Stultz To: lkml Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz Subject: [RESEND][PATCH v3 06/26] drm: kirin: Remove out_format from ade_crtc Date: Wed, 14 Aug 2019 18:46:42 +0000 Message-Id: <20190814184702.54275-7-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190814184702.54275-1-john.stultz@linaro.org> References: <20190814184702.54275-1-john.stultz@linaro.org> From: Xu YiPing As part of refactoring the kirin driver to better support different hardware revisions, this patch removes the out_format field in the struct ade_crtc, which was only ever set to LDI_OUT_RGB_888. Thus this patch removes the field and instead directly uses LDI_OUT_RGB_888. Cc: Rongrong Zou Cc: Xinliang Liu Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel Cc: Sam Ravnborg Reviewed-by: Sam Ravnborg Signed-off-by: Xu YiPing [jstultz: reworded commit message] Signed-off-by: John Stultz --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) -- 2.17.1 diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 756aefd5bcff..73dff21bed6a 100644 --- a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c +++ b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c @@ -60,7 +60,6 @@ struct ade_crtc { struct ade_hw_ctx *ctx; struct work_struct display_reset_wq; bool enable; - u32 out_format; }; struct ade_plane { @@ -383,11 +382,10 @@ static irqreturn_t ade_irq_handler(int irq, void *data) return IRQ_HANDLED; } -static void ade_display_enable(struct ade_crtc *acrtc) +static void ade_display_enable(struct ade_hw_ctx *ctx) { - struct ade_hw_ctx *ctx = acrtc->ctx; void __iomem *base = ctx->base; - u32 out_fmt = acrtc->out_format; + u32 out_fmt = LDI_OUT_RGB_888; /* enable output overlay compositor */ writel(ADE_ENABLE, base + ADE_OVLYX_CTL(OUT_OVLY)); @@ -514,7 +512,7 @@ static void ade_crtc_atomic_enable(struct drm_crtc *crtc, } ade_set_medianoc_qos(ctx); - ade_display_enable(acrtc); + ade_display_enable(ctx); ade_dump_regs(ctx->base); drm_crtc_vblank_on(crtc); acrtc->enable = true; @@ -1024,7 +1022,6 @@ static int ade_drm_init(struct platform_device *pdev) ctx = &ade->ctx; acrtc = &ade->acrtc; acrtc->ctx = ctx; - acrtc->out_format = LDI_OUT_RGB_888; ret = ade_dts_parse(pdev, ctx); if (ret)