From patchwork Fri Sep 14 20:09:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 10601185 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 91A0514DA for ; Fri, 14 Sep 2018 20:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 78E7F2BA24 for ; Fri, 14 Sep 2018 20:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CF0D2BAA8; Fri, 14 Sep 2018 20:09:58 +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 D65D12BA24 for ; Fri, 14 Sep 2018 20:09:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 032FA6E82D; Fri, 14 Sep 2018 20:09:57 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6E40F6E82D for ; Fri, 14 Sep 2018 20:09:55 +0000 (UTC) Received: from localhost.localdomain (cpc89242-aztw30-2-0-cust488.18-1.cable.virginm.net [86.31.129.233]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 07B9BCE; Fri, 14 Sep 2018 22:09:52 +0200 (CEST) From: Kieran Bingham To: Laurent Pinchart , linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, Alexandru Gheorghe Subject: [PATCH] drm: rcar-du: Revert "drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic" Date: Fri, 14 Sep 2018 21:09:49 +0100 Message-Id: <20180914200949.25763-1-kieran.bingham+renesas@ideasonboard.com> X-Mailer: git-send-email 2.17.1 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: David Airlie , Kieran Bingham MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Commit: 161ad653d6c9 ("drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic") causes a regression in the R-Car DU display driver, and prevents any output from being displayed. The display appears to function correctly but only a black screen is ever visible. Revert the commit. Signed-off-by: Kieran Bingham --- Looking through the code, the reason for this issue isn't particularly obvious - and will need some further exploration, which I can't look at until Tuesday. So I'm posting this revert patch to A) Report the issue B) Provide a temporary fix I suspect either the initial alpha value is not set correctly or setting state->pixel_blend_mode = DRM_MODE_BLEND_PREMULTI; causes some side effect perhaps. There's not much else that could be different between the helper, and the original code. drivers/gpu/drm/rcar-du/rcar_du_plane.c | 6 ++++-- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index 9e07758a755c..5c2462afe408 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_plane.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_plane.c @@ -686,12 +686,14 @@ static void rcar_du_plane_reset(struct drm_plane *plane) if (state == NULL) return; - __drm_atomic_helper_plane_reset(plane, &state->state); - state->hwindex = -1; state->source = RCAR_DU_PLANE_MEMORY; state->colorkey = RCAR_DU_COLORKEY_NONE; state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1; + + plane->state = &state->state; + plane->state->alpha = DRM_BLEND_ALPHA_OPAQUE; + plane->state->plane = plane; } static int rcar_du_plane_atomic_set_property(struct drm_plane *plane, diff --git a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c index 4576119e7777..3170b126cfba 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_vsp.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_vsp.c @@ -341,8 +341,11 @@ static void rcar_du_vsp_plane_reset(struct drm_plane *plane) if (state == NULL) return; - __drm_atomic_helper_plane_reset(plane, &state->state); + state->state.alpha = DRM_BLEND_ALPHA_OPAQUE; state->state.zpos = plane->type == DRM_PLANE_TYPE_PRIMARY ? 0 : 1; + + plane->state = &state->state; + plane->state->plane = plane; } static const struct drm_plane_funcs rcar_du_vsp_plane_funcs = {