From patchwork Tue Mar 17 01:21:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 6026841 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Original-To: patchwork-linux-sh@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B92C89F314 for ; Tue, 17 Mar 2015 01:21:07 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DD7F62045B for ; Tue, 17 Mar 2015 01:21:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BD3782013D for ; Tue, 17 Mar 2015 01:21:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752094AbbCQBVF (ORCPT ); Mon, 16 Mar 2015 21:21:05 -0400 Received: from mail-pd0-f177.google.com ([209.85.192.177]:36543 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbbCQBVE (ORCPT ); Mon, 16 Mar 2015 21:21:04 -0400 Received: by pdbcz9 with SMTP id cz9so74043531pdb.3 for ; Mon, 16 Mar 2015 18:21:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:subject; bh=zevVPyE3wlfTNyTpfhxP0I/TYsnoBZQ5kcQEo6CESYU=; b=lEMFzcWWQKBlRhzjlHNLiRqHA1SWwohACm6PltYFBgZxclzgaNgsUqfa4Mq8rbZC5c y0lOFMHXKbf2RVh8+Td2RZyRtOHxvCj1zn9ASuyLW3eHA/4GCx26gP1egOhgJW3IxnyT oHvAZI71wqga3nu2+LtnEd59mS5XDKOSRa15eaEv+HOijyVZNG5YrFZTM8r8OcdNYoqU xqOBdeFC86azPNs1JXqaH84dhUtze4oNUqJKgUCx4qjllWqPOK4vRsD8g4llUSQo0/Zk oaI21x7hlCqNQeQb802U27y+JGHRLERt7zbDh6yV2V9z4c/xnNxDu+mvq2tvjoY6QAmc Fi6w== X-Received: by 10.66.101.7 with SMTP id fc7mr110559618pab.26.1426555263998; Mon, 16 Mar 2015 18:21:03 -0700 (PDT) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id k10sm19270097pdn.64.2015.03.16.18.21.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Mar 2015 18:21:02 -0700 (PDT) From: Magnus Damm To: linux-sh@vger.kernel.org Cc: Magnus Damm Date: Tue, 17 Mar 2015 10:21:56 +0900 Message-Id: <20150317012156.3466.18403.sendpatchset@little-apple> Subject: [PATCH] drm/rcar-du: Avoid restarting when shutting down Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Magnus Damm This is a prototype patch that removes one DU restart operation from the shutdown sequence. With this in place both the required time for mode switching is reduced and so is the amount of flicker. Needs to be reworked to fit on top of atomic update support. Not-Yet-Signed-off-by: Magnus Damm --- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/gpu/drm/rcar-du/rcar_du_crtc.c +++ work/drivers/gpu/drm/rcar-du/rcar_du_crtc.c 2015-03-16 12:43:00.127684181 +0900 @@ -187,7 +187,7 @@ void rcar_du_crtc_route_output(struct dr rcdu->dpad0_source = rcrtc->index; } -void rcar_du_crtc_update_planes(struct drm_crtc *crtc) +static void __rcar_du_crtc_update_planes(struct drm_crtc *crtc, bool restart) { struct rcar_du_crtc *rcrtc = to_rcar_crtc(crtc); struct rcar_du_plane *planes[RCAR_DU_NUM_HW_PLANES]; @@ -247,7 +247,7 @@ void rcar_du_crtc_update_planes(struct d */ if (value != dptsr) { rcar_du_group_write(rcrtc->group, DPTSR, dptsr); - if (rcrtc->group->used_crtcs) + if (restart && rcrtc->group->used_crtcs) rcar_du_group_restart(rcrtc->group); } } @@ -256,6 +256,11 @@ void rcar_du_crtc_update_planes(struct d dspr); } +void rcar_du_crtc_update_planes(struct drm_crtc *crtc) +{ + __rcar_du_crtc_update_planes(crtc, true); +} + static void rcar_du_crtc_start(struct rcar_du_crtc *rcrtc) { struct drm_crtc *crtc = &rcrtc->crtc; @@ -314,7 +319,7 @@ static void rcar_du_crtc_stop(struct rca mutex_lock(&rcrtc->group->planes.lock); rcrtc->plane->enabled = false; - rcar_du_crtc_update_planes(crtc); + __rcar_du_crtc_update_planes(crtc, false); mutex_unlock(&rcrtc->group->planes.lock); /* Select switch sync mode. This stops display operation and configures