From patchwork Mon Aug 19 23:03:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11102301 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 3BEDE1399 for ; Mon, 19 Aug 2019 23:03:39 +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 25DAA20644 for ; Mon, 19 Aug 2019 23:03:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25DAA20644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org 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 0AA816E44E; Mon, 19 Aug 2019 23:03:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x641.google.com (mail-pl1-x641.google.com [IPv6:2607:f8b0:4864:20::641]) by gabe.freedesktop.org (Postfix) with ESMTPS id 68DCD6E44B for ; Mon, 19 Aug 2019 23:03:33 +0000 (UTC) Received: by mail-pl1-x641.google.com with SMTP id m9so1678609pls.8 for ; Mon, 19 Aug 2019 16:03:33 -0700 (PDT) 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=IcvzzFr1yUCqUm7igC+fhVBaiFn8HJOuskJ5pNSj2cg=; b=GiV1KSDlx7d/syJKAoZcWwvO2nOwgIvtgMEDQN31/lpipkk9+ivqTGWZy75GiwP8+n 7NXoAlcn+OiI/gGAuZLlyg9c/Y6DBk3tTfhBpe2gLXwv605bVOI2YQR1aSBfX9wilfPh 0LIZ6gtOF1cl+AVJ/WMOwlEM2kRbRcGFDFL/a4trHNAX08m+4Esh5oaeFnhcruNYxNFj tLXczhzGsViJ8iTBCtw0YCSvZPdsqtwB19Mb+6//OCeiDBFA1v7flyCgzi/6Reu+8PUP /4bGAfjHdrSGIFmSlTe2Hx+IJIBJ5q8bJa7ZTx5W9uNm9DUfVSPjBFacoA0nrjPMliuy kdtQ== X-Gm-Message-State: APjAAAUh47QRV6ZLs72m4vyuTNQ3qw3UKvz5m820cAlWbwaG+XdnGHjK tGyDDgg5Fk3zBKawdj65+kP8sQ== X-Google-Smtp-Source: APXvYqy/9b7QWfSgj3BIIPDwjkoJZHMNmpA/Rmy6iIYI573jdO2gK9EuSuIV7vpseihMBWmjyCA99g== X-Received: by 2002:a17:902:2be6:: with SMTP id l93mr25408789plb.0.1566255812927; Mon, 19 Aug 2019 16:03:32 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id j15sm17256509pfr.146.2019.08.19.16.03.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Aug 2019 16:03:32 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH v4 05/25] drm: kirin: Remove out_format from ade_crtc Date: Mon, 19 Aug 2019 23:03:01 +0000 Message-Id: <20190819230321.56480-6-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190819230321.56480-1-john.stultz@linaro.org> References: <20190819230321.56480-1-john.stultz@linaro.org> X-Mailman-Original-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=IcvzzFr1yUCqUm7igC+fhVBaiFn8HJOuskJ5pNSj2cg=; b=U4WeI3251DHI0T6iewjy1ZAE/Tc5MUMKKiHzuVnDn4qP3R+sfhglpWK8NOllEgsE/Q 9Od7X+IMIF29m6np2J9o7qEpvYklowBSUA9uzqONjTX3sMidJ9GbL7zWSKSMBcSsQ4KT VPtF9zelPzmK19fZtC/u8fOH5YhKuMXoHo0gwlIVhpuar4afvYQQFCYT2HsvuLZBdTkr AFn4988z8PfbRracVplm92ipaemHwq3W+Uu3Y7kc07ZL6JECVPQKuxJMIkfS9ZM9FImN P5WulyxgZGwP871nGDuMSEUpsU0cwAuZoGd9UoYlF5bCGpKOwKXC7socjuNCEGyTHOFT t3lg== X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Xu YiPing , David Airlie , dri-devel , Xinliang Liu , Rongrong Zou , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 Acked-by: Xinliang Liu 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(-) diff --git a/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c b/drivers/gpu/drm/hisilicon/kirin/kirin_drm_ade.c index 45351934d919..65f1a57f7304 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)