From patchwork Wed Dec 5 16:29:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sean Paul X-Patchwork-Id: 10714573 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 3374B17DB for ; Wed, 5 Dec 2018 16:30:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 23C472DCAB for ; Wed, 5 Dec 2018 16:30:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0AFC52DC3E; Wed, 5 Dec 2018 16:30:15 +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 9CC432DCA2 for ; Wed, 5 Dec 2018 16:30:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2A82A6E4AA; Wed, 5 Dec 2018 16:30:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yw1-xc42.google.com (mail-yw1-xc42.google.com [IPv6:2607:f8b0:4864:20::c42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8DF336E4AB for ; Wed, 5 Dec 2018 16:30:11 +0000 (UTC) Received: by mail-yw1-xc42.google.com with SMTP id h193so8778507ywc.4 for ; Wed, 05 Dec 2018 08:30:11 -0800 (PST) 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:mime-version:content-transfer-encoding; bh=TcBxYvhDgOXfovQonTT/DRAOmEBO6f/w9cFOsK5SsY0=; b=d/Zd87xLSWDBv/lfBJWkjiEPI25fc3oOQhYzHsd5FzzLvsgC5jtIQtQm9rk6xhu+ku AswEXFfegOzCoFdFkVU6caeVxNxxzdWHO2IYS2mzqVGk1z4Et0++rAR1HkzGODMk0krK K4cld7YqQHTJ5vkJiXHZRdSAzePSR4qZOL/gmKRZfKqkJfk/a2xq/tf+FHEmIaLb7hFd /SfkGCIlv0zn8SaCikq7MRnnDbbPnVb9ml6CfRP1rHwr67wlIQds3l1zXYq44Mf5M+wI +2uo5Gd6r1/gjroiL7utDjO4wqJwyIGxA7n5qsZhWtNVafqN6Qs9KWFiMMqElrxHxAcJ pKdg== X-Gm-Message-State: AA+aEWZP2Lnmqc/5djyvJVZfmXSKN6A9KZVLqksNaQwzE6Fa7tPgtEbI lISzyP6NdDpcxvM8IQy0TbFerw== X-Google-Smtp-Source: AFSGD/W4jpFkbycX57BeTCS88b1iYQ6t2HHTuFXwBxb8dw0+vUtoKM90J/XEHmLERdq2bKg7j8JoIg== X-Received: by 2002:a81:1492:: with SMTP id 140mr24359380ywu.333.1544027410762; Wed, 05 Dec 2018 08:30:10 -0800 (PST) Received: from rosewood.cam.corp.google.com ([2620:0:1013:11:ad55:b1db:adfe:3b9f]) by smtp.gmail.com with ESMTPSA id n133sm6460470ywb.55.2018.12.05.08.30.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Dec 2018 08:30:10 -0800 (PST) From: Sean Paul To: Subject: [PATCH 6/9] drm/msm: mdp5: Remove premultiplied from plane state Date: Wed, 5 Dec 2018 11:29:38 -0500 Message-Id: <20181205162958.25025-6-sean@poorly.run> X-Mailer: git-send-email 2.20.0.rc1.387.gf8505762e3-goog In-Reply-To: <20181205162958.25025-1-sean@poorly.run> References: <20181205162958.25025-1-sean@poorly.run> MIME-Version: 1.0 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: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Sean Paul , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Sean Paul It's always 0, and not exposed via property, so remove it and all affected code. Signed-off-by: Sean Paul --- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 13 +------------ drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h | 1 - drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 2 -- drivers/gpu/drm/msm/msm_drv.h | 1 - 4 files changed, 1 insertion(+), 16 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c index c5fde1a4191aa..035be33405f08 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c @@ -310,18 +310,7 @@ static void blend_setup(struct drm_crtc *crtc) DBG("Stage %d fg_alpha %x bg_alpha %x", i, fg_alpha, bg_alpha); - if (format->alpha_enable && pstates[i]->premultiplied) { - blend_op = MDP5_LM_BLEND_OP_MODE_FG_ALPHA(FG_CONST) | - MDP5_LM_BLEND_OP_MODE_BG_ALPHA(FG_PIXEL); - if (fg_alpha != 0xff) { - bg_alpha = fg_alpha; - blend_op |= - MDP5_LM_BLEND_OP_MODE_BG_MOD_ALPHA | - MDP5_LM_BLEND_OP_MODE_BG_INV_MOD_ALPHA; - } else { - blend_op |= MDP5_LM_BLEND_OP_MODE_BG_INV_ALPHA; - } - } else if (format->alpha_enable) { + if (format->alpha_enable) { blend_op = MDP5_LM_BLEND_OP_MODE_FG_ALPHA(FG_PIXEL) | MDP5_LM_BLEND_OP_MODE_BG_ALPHA(FG_PIXEL); if (fg_alpha != 0xff) { diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h index 854dfd30e8292..61b3331dcab9c 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.h @@ -108,7 +108,6 @@ struct mdp5_plane_state { struct mdp5_hw_pipe *r_hwpipe; /* right hwpipe */ /* aligned with property */ - uint8_t premultiplied; uint8_t zpos; uint8_t alpha; diff --git a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c index 1a36d6f612826..e96aff8e55757 100644 --- a/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c +++ b/drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c @@ -174,7 +174,6 @@ mdp5_plane_atomic_print_state(struct drm_printer *p, drm_printf(p, "\tright-hwpipe=%s\n", pstate->r_hwpipe ? pstate->r_hwpipe->name : "(null)"); - drm_printf(p, "\tpremultiplied=%u\n", pstate->premultiplied); drm_printf(p, "\tzpos=%u\n", pstate->zpos); drm_printf(p, "\talpha=%u\n", pstate->alpha); drm_printf(p, "\tstage=%s\n", stage2name(pstate->stage)); @@ -192,7 +191,6 @@ static void mdp5_plane_reset(struct drm_plane *plane) /* assign default blend parameters */ mdp5_state->alpha = 255; - mdp5_state->premultiplied = 0; if (plane->type == DRM_PLANE_TYPE_PRIMARY) mdp5_state->zpos = STAGE_BASE; diff --git a/drivers/gpu/drm/msm/msm_drv.h b/drivers/gpu/drm/msm/msm_drv.h index 6c013addce68c..b6aa04511ded9 100644 --- a/drivers/gpu/drm/msm/msm_drv.h +++ b/drivers/gpu/drm/msm/msm_drv.h @@ -73,7 +73,6 @@ struct msm_file_private { enum msm_mdp_plane_property { PLANE_PROP_ZPOS, PLANE_PROP_ALPHA, - PLANE_PROP_PREMULTIPLIED, PLANE_PROP_MAX_NUM };