From patchwork Tue Aug 20 23:06:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 171864 Delivered-To: patches@linaro.org Received: by 2002:a92:d204:0:0:0:0:0 with SMTP id y4csp179950ily; Tue, 20 Aug 2019 16:06:37 -0700 (PDT) X-Received: by 2002:a17:90a:4c:: with SMTP id 12mr2314588pjb.40.1566342397490; Tue, 20 Aug 2019 16:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566342397; cv=none; d=google.com; s=arc-20160816; b=Ud9piNqxbW5l90IYDmB75dwTo2qLEjroLv69iRFMys8BeendM7OS99v9/lok62xx8H N8wBOtFnzXBetUyBY/UMsRx3lvx7Hzg3cxTcMd4pk53T/WpoTbm6GwBgn9u8163O1RBb /o58MCpNrE7d+b7QLxBh4xebHIra+etsOch1OyPFwWIc6sMx1e19dbJ/ywvByShoaMCr hPZGkYIZbL6daKKEwtz8MQV3Gy5SJslwxUCx2CoW43o2YuYSNs7fPecghsymzqbrDz3r IXv6BH3/TU5RKuPHs5+DrFk2Zv9plFrCUff726kcpqVgYjLYHaaMu/X3NL8r4LUYjvB7 KTfg== 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=TQn0yL22D/O1NB6RHs/K6PotDgS7bF/4LqAnw0bxJ/LCWRtya6DHplTGewDDyaxP8W RFq1ga6Aa/LCswXUIwhPONH5F53FAp+VtmUhdi1pX3ozKkoPPvEFebB2yLXRk1KkIT7C 5XKJeEGEEqN/lQsh0ksbGdbqq59XKBOMSNXyUf6Ogt99n8bT+PtAfIHWONT/0nPoUacv FussabdYH8on3j8eZAU/lZdnls5okOX4LUl0wMdiUK2uwLsCDhYq1GRMxA2t168n2dxr wleTlvSr01sRZ4ucqpCyOxoVEkcXhfNpePN49HvjZ7hsRYiNDZ4Th/KWfkWNxHWOhV75 fy5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=s6WQ7sIS; 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 196sor4463572pgg.26.2019.08.20.16.06.37 for (Google Transport Security); Tue, 20 Aug 2019 16:06:37 -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=s6WQ7sIS; 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=s6WQ7sISarwjn/LoXRuWTs7T9mI5glGbXZ8EsPI3bJI84uER1hU+D4STDBevGNYS3Z eOvv5irY6DvPeWzChsKAuakSVEFkiW8fIPj9iEVuzTxRkakHzBvVbJl0FlVpnSJenv9d oUJ9gN9hBHJudtKn5GBt22PjFXTs1PV+hJA8u6D32MuR5+IQjqNaFWUvr7EnYQyDfM4e gRcM1L8/KdxdVssB84zN+ICvvYZKBrcOQUwjy8cozJJY6u/J9LfaZoSSyXmW9cieqa08 AwWuH+bjNzMQG0fL+nLfeolv/+EHIUXxixtM7d/daNtzOmFYkW4AB5qLThiEB2YXp4Ay CTgg== 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=Ry5m0tYGUiyfVCjQSZ2+UbQtTJWHxy/zjZiA6hj+HkKDx2wSOe2JbwvtcGGQBNSF5v PDVqKmjGmCHuVq5MiScM59hfdKiGagoUDXZ6aVBCFvcW2yQBsrROhMJfK7k+ZvsPBuav dvmeKckHDYXUgIOs5gviZTe3hcfXsA48LsUwRfZ9HNhYQ+4AOieS+9inlIutZHYVCv7e gCVeB9epBAvp9YYe5fk9DFrkRvCY/NTuKefSVyFQTMq4aljrhcTNQFwnfhZvSEmcyHvf ql5LdzohY1U2SEwvqN6MSSlUk3Xy0RPtPAWaQT2pL2BEbtqnWEZdpx4zKCWfki0SsECo cXZQ== X-Gm-Message-State: APjAAAUDGtEdjMoRmL/AEdSb0YlT4QNQwUTBk2UrqWF6qBAL4Sm0IOiQ o66B5lRbRmiS9mHXkX3EmW2VYhcv X-Google-Smtp-Source: APXvYqwhPnpN+NIoIIfhZvjoBsWXfZaXDVMAu7KdrUCnG//Qro9vlYsd9RANeyEKSV9ZPwGORsOy6w== X-Received: by 2002:a63:5b23:: with SMTP id p35mr26142289pgb.366.1566342397025; Tue, 20 Aug 2019 16:06:37 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id q4sm27564747pff.183.2019.08.20.16.06.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Aug 2019 16:06:36 -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 v5 05/25] drm: kirin: Remove out_format from ade_crtc Date: Tue, 20 Aug 2019 23:06:06 +0000 Message-Id: <20190820230626.23253-6-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190820230626.23253-1-john.stultz@linaro.org> References: <20190820230626.23253-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)