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: 10601183 X-Patchwork-Delegate: geert@linux-m68k.org 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 3069F17E1 for ; Fri, 14 Sep 2018 20:09:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 16CDB2BA24 for ; Fri, 14 Sep 2018 20:09:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 073402BAA8; Fri, 14 Sep 2018 20:09:56 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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 6F7462BA24 for ; Fri, 14 Sep 2018 20:09:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727716AbeIOBZy (ORCPT ); Fri, 14 Sep 2018 21:25:54 -0400 Received: from perceval.ideasonboard.com ([213.167.242.64]:42202 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726891AbeIOBZy (ORCPT ); Fri, 14 Sep 2018 21:25:54 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1536955793; bh=CWNnZmZaouJOyLL0D0YDfbbstpD5wawZLI8ZiB0UnvQ=; h=From:To:Cc:Subject:Date:From; b=bleERPmBxMesEu1xf8BjbkPNjgdXN8TzccTPK83MuRPSVnOSskLO5s5RxzSaDUYxe QE59f9ToJwS3s+iQ+jsTma5/bKR6MlhWEsaVjIEcJApFUuhQWEdwvT+FM/dWwv2tzE iAksKaMR9cbMg+UKl9FnWBNZv65PoLi/dc11/9iw= From: Kieran Bingham To: Laurent Pinchart , linux-renesas-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, Alexandru Gheorghe Cc: David Airlie , Kieran Bingham 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 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org 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 = {