Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1794550imm; Thu, 20 Sep 2018 03:03:43 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda/6BcqdcxBysqYnRCoaOoqpA2ECsOCZMzwLIgd2AYyOKUGG3Asw3iG21jc+xjliMu2ObVq X-Received: by 2002:a63:c046:: with SMTP id z6-v6mr36399687pgi.114.1537437823142; Thu, 20 Sep 2018 03:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537437823; cv=none; d=google.com; s=arc-20160816; b=jPQLvyVrmrx2NYNXUyPjou1/3BrWIqD8UVMmRnxG28M0Tj3pOFR2rh/8EtRNN0Oj8Z JBsDL5G5LN03vF4szxl9SQb1aV6uBHauiQW9Q/iygqE6IfFmdrLUEdLOLA6UEFkL2kq6 SbcGrnVE62friu44q54/Eh5ZLg4PY6l432PdCSVDrebkX0ypiQ9FY6erOgjRdgpwdMq+ uD+YfK+OaaLKZUFdhe2OtzGxHavsfE99KcDooidtEMcuUK7U5Bx5UVCqpdk1l+1rApya OGLk8ui4ph93zYv1l1uUXDPb5QfJ+yztpPHBrSNzO+WI9Jf+gHBcLMQhEKb/yvAtMEvN NX3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject:reply-to :dkim-signature; bh=I/V5p+MFFHqRw+0m2pTyqDZoj9NtJdSvMgsFpN6Gwq8=; b=xq2+vYVKMoP94FTkOh1Ku8o1041Tg4snSVjOyjplgB97m7WWgTulGoBpVgwvnv06gq 1nbszhAtVr5nUIi+mhh4O49Jgk4TJTnzMIPEw0tJoPsRBUkTrcNET5Ibm4nKEJLrfjbx KibWuO4S+qruf4K5lXCdp5Dh46BdtakPsZnSdPYts3o+HWzUNMzZ083whfV1vRcqzX/t Y/VLEKTtltDHEvXX4kL/pPepOaQ5KBwACUfGp880kFO7VUZoIjSlGohQvx10MhhKtELe yyWQ31nnNB2b/rz/ORsWtUqPzwPtA70EL6O2u2ygwpBEQbVhXKlkr9YgVZm5+Gs/4m+f Lymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=FITAfbJH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u10-v6si22941021plu.506.2018.09.20.03.03.27; Thu, 20 Sep 2018 03:03:43 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=FITAfbJH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732064AbeITPp7 (ORCPT + 99 others); Thu, 20 Sep 2018 11:45:59 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:48950 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731787AbeITPp7 (ORCPT ); Thu, 20 Sep 2018 11:45:59 -0400 Received: from [192.168.0.23] (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 8DEE31A9C; Thu, 20 Sep 2018 12:03:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1537437796; bh=7gxTIUpw7Yvr6jeR2lXLSrsn0oq8d+xqePVPW3jparE=; h=Reply-To:Subject:To:Cc:References:From:Date:In-Reply-To:From; b=FITAfbJHoXZ0dLjaqoHqI4aTEoUXePg/IvoIko0df3uPeoJLcI1DKHmB/PCbDQRr8 OjdG1nB7HIeYlOslUztjX9MTh3OcQHfpmkVotB6uUS1T1byIawYzBUJ5yBg2o0ieGC YJIbj5kJKQT/mpLa3zJ+AzSMg4f57V6nmuWTqWbk= Reply-To: kieran.bingham+renesas@ideasonboard.com Subject: Re: [PATCH 1/2] drm/atomic: Initialise planes with opaque alpha values To: Alexandru-Cosmin Gheorghe , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Laurent Pinchart Cc: linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , open list , Sean Paul , nd@arm.com References: <20180919155700.10342-1-kieran.bingham+renesas@ideasonboard.com> <20180919155700.10342-2-kieran.bingham+renesas@ideasonboard.com> <20180919161545.GH5565@intel.com> <20180919164347.GA21403@e114479-lin.cambridge.arm.com> From: Kieran Bingham Organization: Ideas on Board Message-ID: <007554b7-8aa4-3ecd-354a-c63ec6fa39f8@ideasonboard.com> Date: Thu, 20 Sep 2018 11:03:12 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180919164347.GA21403@e114479-lin.cambridge.arm.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexandru, On 19/09/18 17:43, Alexandru-Cosmin Gheorghe wrote: > Hi Kieran, > > > On Wed, Sep 19, 2018 at 07:15:45PM +0300, Ville Syrjälä wrote: >> 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ä > > Neither do I, so: > Reviewed-by: Alexandru Gheorghe > > And thanks again. > > I plan to push it tomorrow to drm-misc-next. > > Now, I've seen the plane_reset patches in the pull request for drm-next > 4.20, I wonder if someone could tell me what should I do to get this > patch on that train. I've submitted a separate patch for the rcar-du which enables the alpha property for the primary plane - and it incorporates a "Fixes: 161ad653d6c9 ("drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic")" tag. Technically that should be sufficient to get that fix into v4.19 I believe ... But if you feel that this patch should also be included - we could add the same tag to this patch, and get it queued up for v4.19 fixes? -- Regards Kieran > >> >>> 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 >