From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14BADC433F4 for ; Wed, 19 Sep 2018 16:15:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C25E620858 for ; Wed, 19 Sep 2018 16:15:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C25E620858 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732336AbeISVyd (ORCPT ); Wed, 19 Sep 2018 17:54:33 -0400 Received: from mga07.intel.com ([134.134.136.100]:49765 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731332AbeISVyd (ORCPT ); Wed, 19 Sep 2018 17:54:33 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2018 09:15:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,394,1531810800"; d="scan'208";a="91495491" Received: from stinkbox.fi.intel.com (HELO stinkbox) ([10.237.72.174]) by fmsmga001.fm.intel.com with SMTP; 19 Sep 2018 09:15:46 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 19 Sep 2018 19:15:45 +0300 Date: Wed, 19 Sep 2018 19:15:45 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Kieran Bingham Cc: Laurent Pinchart , linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , Alexandru-Cosmin Gheorghe , open list , Sean Paul Subject: Re: [PATCH 1/2] drm/atomic: Initialise planes with opaque alpha values Message-ID: <20180919161545.GH5565@intel.com> References: <20180919155700.10342-1-kieran.bingham+renesas@ideasonboard.com> <20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 19, 2018 at 04:56:58PM +0100, Kieran Bingham wrote: > Planes without an alpha property, using __drm_atomic_helper_plane_reset > will have their plane state alpha initialised as zero, which represents > a transparent alpha. > > If this value is then used for the plane, it may not be visible by > default, and thus doesn't represent a good initialisation state. > > Update the default state->alpha value to DRM_BLEND_ALPHA_OPAQUE > unconditionally when the plane is reset. > > Signed-off-by: Kieran Bingham > --- > drivers/gpu/drm/drm_atomic_helper.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c > index 3cf1aa132778..e49b22381048 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -3569,9 +3569,7 @@ void __drm_atomic_helper_plane_reset(struct drm_plane *plane, > state->plane = plane; > state->rotation = DRM_MODE_ROTATE_0; > > - /* Reset the alpha value to fully opaque if it matters */ > - if (plane->alpha_property) > - state->alpha = plane->alpha_property->values[1]; > + state->alpha = DRM_BLEND_ALPHA_OPAQUE; I can't come up with a solid excuse for not initializing it always. Reviewed-by: Ville Syrjälä > state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI; > > plane->state = state; > -- > 2.17.1 > > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrjälä Intel