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: 10714569 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 16EBE13AF for ; Wed, 5 Dec 2018 16:30:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 087412DC66 for ; Wed, 5 Dec 2018 16:30:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F143A2DC8E; Wed, 5 Dec 2018 16:30:12 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 88A812DC6C for ; Wed, 5 Dec 2018 16:30:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727103AbeLEQaM (ORCPT ); Wed, 5 Dec 2018 11:30:12 -0500 Received: from mail-yw1-f67.google.com ([209.85.161.67]:40841 "EHLO mail-yw1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728102AbeLEQaL (ORCPT ); Wed, 5 Dec 2018 11:30:11 -0500 Received: by mail-yw1-f67.google.com with SMTP id r130so8770801ywg.7 for ; Wed, 05 Dec 2018 08:30:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=poorly.run; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TcBxYvhDgOXfovQonTT/DRAOmEBO6f/w9cFOsK5SsY0=; b=HjP76d6L6hcsroUDYIjKs36mtFu7MX9gXXgUsvSsURJzgi6i2JieDa1J0WidyNTtQJ TK1QXU1vPGYWrEwI64qWO6F1HNSphd10oYUaiKC0pzGY/+ZTQkLfymXQXHNgmjQvm2YN QXBhRBGPXObH8sTHlIWQPxgpqaMTWIsAsU/O6YsUGcCRW4FEwTMtE0Dnjr6YpspsMGMX /XjX//VxixKnHsXajrp3QF+++R3Bt/W5N9SPqy7FoPk5CwqrnUSErE/Psnxtv23px51P ApvarlwBgHAdfMQNkOwmVtSpE7SX3gfo+tSZvIFMLo5LBC8Hkhg5aBbYmYuGWNbRvhO6 tmgA== 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=nl2nFM14iBvrbrbPLrxaWSBchTWpTr3vAcv2TZEbSLRA9iZ27yaZz3LbAU7c+mN4xB 3Ozigrom24EsQUJN/3glXyC3kwz+rTiZSdwo17ynJeApxxEpy5VFCXNAX48gw+DPGK5A 3U0wlwA14ZO3yqJ/phj+k/zSu0abdlE8IMkNGwxoSVkm+aTs+7qOQueBbZQlYStfrezp YtZJ3Fxz1tnzb8RXnZU+mFwyPxCrkftkym4b+GIMXuspmG1zOuJM700J7AO7d4Q++zdD uhAO7ycACNuz/EpsufsNqfz0oSAQVCESEDP1Y/JSTXAzBMUUSSngcrg3G9amBsXqlK/d a3BA== X-Gm-Message-State: AA+aEWaX5W5SbgJHm7/PmOMhdAYlk+HcEzNCEpfZqNPqNTKZ4Fcgk/lW JeL/eJLSc4wTlCd4gSDddlEhhQ== 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 Cc: robdclark@gmail.com, jsanka@codeaurora.org, Sean Paul , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org 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 To: unlisted-recipients:; (no To-header on input) Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 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 };