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: 171734 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp3595761ily; Mon, 19 Aug 2019 16:03:33 -0700 (PDT) X-Received: by 2002:a17:902:ba0c:: with SMTP id j12mr14797128pls.231.1566255813295; Mon, 19 Aug 2019 16:03:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566255813; cv=none; d=google.com; s=arc-20160816; b=vpV8F8qaMadzTckI8zUohMFmYh1Of+exfSNK1OQmPGId52U8VxKSaUAingP76bGENp 1VxK+9NLak7Tq3mw/pCoHqr7FwwKl2cZ+raZB4MtC3x5XtjxJHgg0xQb3H2ShdY82/Jg wtxg/+Bh/2c4R+QgmXZ5+IJMpQ4fMr+gRXFq/bYsCimzV5mBWv+BCCndnN2wZvfL4N16 +2fLku9im7buPa2W1noYowYlDmMAtVnQQYuojDSAbZpKNd6Ouqa5TMfDaQ1xOrNny93j 3dnjdoMAyeZ6faw+uXTmv2Srd2T7dQIlJOxAIUH3n41tELfiMt76SSDR8GXqSrMcYxGf yJAw== 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=IcvzzFr1yUCqUm7igC+fhVBaiFn8HJOuskJ5pNSj2cg=; b=WkhFbiw7hR7Cu7qd0hTj43Oj0hxd+GRE1S/mresNoHGZnNcjigeBho7Wl+pIvBfW6W RePFIDPKoCiXTeX0Cu9bL6Xpmk7Bb8bX60vCDS6d3JSbooeMbCxX0J5aOCUNbD5pvF2V m+wV+vTc36HwDfoWagxqlnO20IQK7Ey2RWUrX8arzxF+cKVDDBB6TWwNHCJnTC86SErW skTCsUnF4KqipRDXPFrfYWlFt1r6Wzi6hCa7J4XVyniJzGtw4iwhTSzuS/iG/qUS2XlM P5Dy9cv8cqYfiXgHRI+jFn9R7sFHa5jHhu3DfIzMMCo0gwqVShGZ+6ZfT+Wysg3t1xPe Np6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=U4WeI325; 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 31sor2525358plc.62.2019.08.19.16.03.33 for (Google Transport Security); Mon, 19 Aug 2019 16:03:33 -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=U4WeI325; 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=IcvzzFr1yUCqUm7igC+fhVBaiFn8HJOuskJ5pNSj2cg=; b=U4WeI3251DHI0T6iewjy1ZAE/Tc5MUMKKiHzuVnDn4qP3R+sfhglpWK8NOllEgsE/Q 9Od7X+IMIF29m6np2J9o7qEpvYklowBSUA9uzqONjTX3sMidJ9GbL7zWSKSMBcSsQ4KT VPtF9zelPzmK19fZtC/u8fOH5YhKuMXoHo0gwlIVhpuar4afvYQQFCYT2HsvuLZBdTkr AFn4988z8PfbRracVplm92ipaemHwq3W+Uu3Y7kc07ZL6JECVPQKuxJMIkfS9ZM9FImN P5WulyxgZGwP871nGDuMSEUpsU0cwAuZoGd9UoYlF5bCGpKOwKXC7socjuNCEGyTHOFT t3lg== 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=m8X7+hj6DMhx+D5hnfBdTp94GyNOetzSzbmmWpcvxHr9+1Su8tOxGz8Z6IrmzPjEgo KdNM7Z0WSHiA7PZ84Bbk4fSMrZl8dkC2oILMm8XPrIKLA+WnsEqtCzelSyCXhgSabHw7 H0fgprT/Br1Sp6lMx2fDq4c0/NObdix+lpt7+Iij8Eoe421G4qr85J86gJAgfL9FmWaN YptjcGjtZ6ACmkAY9meax4H40CmbNbwZBo9V9BqWqaaPhAWtbYbD1pgn7mF4ZZEyQFxI fnH5eK2rydX25xYdq/y9C1z4xJrpjg+S+U0AQrnlKF5YavvSoYMdjRcuSNGURw81e2ed 4ZgA== X-Gm-Message-State: APjAAAW2cWVhrs4FsGZpPY0HNSOsZvSCYbl+v2daIq2NJRP0S25De7r+ Fciliy9Y8G+yibVkpraBTfSR5d5l 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) Return-Path: 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 Cc: Xu YiPing , Rongrong Zou , Xinliang Liu , David Airlie , Daniel Vetter , dri-devel , Sam Ravnborg , John Stultz 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> 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(-) -- 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 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)