From patchwork Thu Aug 1 03:44:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 11070111 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D90F113AC for ; Thu, 1 Aug 2019 03:45:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C8A97283C5 for ; Thu, 1 Aug 2019 03:45:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B8593283C3; Thu, 1 Aug 2019 03:45:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 54810283C3 for ; Thu, 1 Aug 2019 03:45:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30D426E33E; Thu, 1 Aug 2019 03:44:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by gabe.freedesktop.org (Postfix) with ESMTPS id C55706E33E for ; Thu, 1 Aug 2019 03:44:55 +0000 (UTC) Received: by mail-pl1-x642.google.com with SMTP id c14so31424714plo.0 for ; Wed, 31 Jul 2019 20:44:55 -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=sbuPXH3VdFgx7EyiYaXP+7dzAxv9Alyn24o+MicDc3g=; b=ZtU9wxNvGFX4YX04Dp9U/tHmKrK0F9VTb5uwJ/ujdcdXtr7TOm4vlvBFrjXtouKuZG vFBQoLzxofdYmW6aov5TFky8cB6ENVsoHa15X/Hh+qy7wFa+cpu3Sv1Otz16gu2yvBGW 9fUKsxk2vU1pb/UwHzYEx6+1N6vwoWfGU/nyvtynvknWlP24hUYgmQlKMBjFTjfQ5hE3 TkEKVvZVU17Ln4SShx6aoO2mrrLgcWsB81cCfVHqDRm7iook2KBn1r6ixgmYTo2iZdsP jzOE0jOBGsC2jByYWI6Jem9gB+ngWaOesGRAb4N7KSf9y+qj0ExXbN05DcnRZgUjn88T UoHg== X-Gm-Message-State: APjAAAWl3m9XUY4BQzZ0WRmhkKLnFXQ9p6MVN3/1YMK/chJUBmbTfgD9 00ha+sgsABfmlBBddEf9lfwC5JCO+pU= X-Google-Smtp-Source: APXvYqzmcmx5lYagz1N9Qyr8XCKv26OVvf3N44AMBU0z4Wll3KHYXMUEXbb/sT/a1R0ggUgnTgQ42w== X-Received: by 2002:a17:902:2987:: with SMTP id h7mr29146186plb.37.1564631094884; Wed, 31 Jul 2019 20:44:54 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id h70sm64775674pgc.36.2019.07.31.20.44.53 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 31 Jul 2019 20:44:54 -0700 (PDT) From: John Stultz To: lkml Subject: [PATCH v3 06/26] drm: kirin: Remove out_format from ade_crtc Date: Thu, 1 Aug 2019 03:44:19 +0000 Message-Id: <20190801034439.98227-7-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190801034439.98227-1-john.stultz@linaro.org> References: <20190801034439.98227-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=sbuPXH3VdFgx7EyiYaXP+7dzAxv9Alyn24o+MicDc3g=; b=PNeeTf6CHxZtmleLM42uzK+kmr5gR/nqDqqSxXjOubaNccBQf+PsluK79zu0fwrSK+ YoHl+OQVP6HivC2BNict9dp1CyvV92P83bB6AWsTC3CVograuwWVb4kcT+hlEYaNy6wp Yg/bNu/6r4VSnp4z3mHIFpPe/vpNDSgp8eAFPSm7pvHCtjSSaluDT8aj4GyXeKcucv22 b/HWFxXZrbLewuFpZLwasAJcrr/89VT07i0bFvV/kmgWDbyAlQZpk95AIWRCHzN/U6cg Y30/O1WPhktFVgstl5QrhZ1km8wStdhadRCk3VhyfPuerwjrQZ7GLJaeMMhq5xXAv976 oF7w== 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 , Rongrong Zou , Sam Ravnborg MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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: 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(-) 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)