From patchwork Tue Apr 23 23:20:36 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 162742 Delivered-To: patches@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4354582jan; Tue, 23 Apr 2019 16:21:08 -0700 (PDT) X-Received: by 2002:a63:1509:: with SMTP id v9mr27116126pgl.194.1556061668282; Tue, 23 Apr 2019 16:21:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556061668; cv=none; d=google.com; s=arc-20160816; b=AH1XlUMjRTRZRF92Yxgt6scg/0kXl4EQaYF0cf9zYya0m2pAvMlto/XsSVEIaBVPOj TyfRMRl0NsbO/DrPNMJqLab5Pn3Rd0kRa9Algs7SkHhpwjFNr+yihnWfcHuHun/1PXV0 seb5BQSXEeeiDgVg07M9jQfaDQLW5hsfMOZlMzo2yKDdC5c1p+zSRUiLL1IOfyqybnoJ wpckfRgHx/Di0QCxKOcdWpCSprThakiQxPXBL2WJwkyufpFevNYzL07XmqRhKo++owa+ VHp1kzSLynftvR7+05+0iiy3x4FYvUTXWm7QALABMRXoM52Kkncr73BEqb8C1c9hB+B2 zYuA== 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=/bl8KjJZ8VdKQUaQRpB+hHEQjF/aOlCQlEyUX72UB6E=; b=xVZFR2n50FvEWG1UsejsXEs5EsRnv0jqLUfTrlxVImW4M5pu38AdAPajR13oSfXJxG 0WObf/TO8/dUe7fo82ULPNxuXSiN1PA7xTI/IuGKqaJLAQYaNIJHJMaqK4k9mcIM8eqW c5nuHH90rnLlEJdxk+L6DYFhgFoL/aAt5QZ3zDfv1lDtHqJPha1j9APgxnKeRBBVxucE m43+neKvrrPJM6SCS4VLL6YI9kiFaBeUCBZ+L4K5Oz3QLAdPEGy2jlbelXImiSO9kdmY 0eBV2EeZqXcUD9iOzr6t6fDcviHXESu+SrWxGXL6XgrhNXT2hQKzXgzv2BAjpqhefVWr Z3mg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OtmWoZBI; 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 r10sor19598378pfd.10.2019.04.23.16.21.08 for (Google Transport Security); Tue, 23 Apr 2019 16:21:08 -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=OtmWoZBI; 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=/bl8KjJZ8VdKQUaQRpB+hHEQjF/aOlCQlEyUX72UB6E=; b=OtmWoZBIcZcpMPhq5QJY7URkVpfaVsaraS6hIv67HgjGOoxqt57yVNkoo6100XtjNx kBnwpBmgfo5Ta4Cq1nVSgLojL8KlHU/Z3ytxnOQISl+0ockKjuwM9vsPDkKXhFHIjVhm obMXeYCsaNw6s033mdWlROD0fpuMO1WntVXFqmdt4dF1yifXbIAcvvs6l/e2qp7GUKpj exbe91fcZi/UYhi8rWQdXk7fBLbLhBq2ifYh0ZUpYwhliv/JigIRtClhoVm9eIVAApud 468K0QK2vuGUEpUFcS1okbeGuAWNqzFvLfdt3OCSGv0Rg+HHkbry27Q4ppANyq73P5ud 1+EA== 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=/bl8KjJZ8VdKQUaQRpB+hHEQjF/aOlCQlEyUX72UB6E=; b=Fk93G0zVchHaNEFBhNbGOzzP1JUsWolfvSIuqqDAaSCYMoBknSBerngUb0wL0Cach3 bLpM3V96dVbJ+vfe7j1Cxkri6yxuMzbB9pco6JuCelquLDNaFx4itigB1J4NXc+RjmwE ZSLFGht4BzliEJMG4Lo6xKC1cbEGZ317qL0TuEd0xzpbTNGGKxPOkIUnDRr6J0NmbeUF jx5+4XYt1xqOIlszYRoA7Auh53sLkJ03wsNFivq60rvDtTt+njyxeL/Vs1bjfqf4QEcg VQQ6H8MHz6sbMpTrdPavmt8gPcdcviZ+bYbLusjtR/pC4l7BLqrpLatKb6gV787AbswP c/lw== X-Gm-Message-State: APjAAAXV5BJF/8XJpaRmphDuXiv/dMWfDrnOrV49SzqK3pMXjy98H9/P ejxYZBUX7kIwF5cX3KsEeruF2JME X-Google-Smtp-Source: APXvYqybCUl1ESlOHxixy4zHex8X6auuxEd3pYgD+rEA0e1A5nQ0uG8/073n5wgpDK5+PbJOxhszuQ== X-Received: by 2002:a62:1d94:: with SMTP id d142mr29806248pfd.83.1556061667802; Tue, 23 Apr 2019 16:21:07 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id c28sm6984235pgm.42.2019.04.23.16.21.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Apr 2019 16:21:07 -0700 (PDT) From: John Stultz To: lkml Cc: Xu YiPing , Xinliang Liu , Rongrong Zou , Xinwei Kong , Chen Feng , David Airlie , Daniel Vetter , dri-devel , John Stultz Subject: [PATCH 05/25] drm: kirin: Remove out_format from ade_crtc Date: Tue, 23 Apr 2019 16:20:36 -0700 Message-Id: <1556061656-1733-6-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1556061656-1733-1-git-send-email-john.stultz@linaro.org> References: <1556061656-1733-1-git-send-email-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: Xinliang Liu Cc: Rongrong Zou Cc: Xinwei Kong Cc: Chen Feng Cc: David Airlie Cc: Daniel Vetter Cc: dri-devel 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.7.4 diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 56a55d9..27a5441 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 drm_device_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)