From patchwork Sat Aug 13 14:09:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Russell King (Oracle)" X-Patchwork-Id: 9280229 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C63A560231 for ; Mon, 15 Aug 2016 00:32:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B707728B06 for ; Mon, 15 Aug 2016 00:32:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA93628B17; Mon, 15 Aug 2016 00:32:12 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID 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 60F1B28B06 for ; Mon, 15 Aug 2016 00:32:12 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D9D156E35C; Mon, 15 Aug 2016 00:31:43 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:3201:214:fdff:fe10:1be6]) by gabe.freedesktop.org (Postfix) with ESMTPS id F16CA6E155 for ; Sat, 13 Aug 2016 14:09:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2014; h=Sender:In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=fR76ZF+0PDKXxIv4ImGkB2ofna8blLuEnzmLcIYbNWQ=; b=TM8FxKJkaNoZMM0FxiMjZ0GFFJErkXODFxPLn7tG1+/eR7rExxiBeWriA307zPyVxoKEMVIXEQAS3myHRh1NwNUnB8WGC2nesGAM8jnZYVyh4qnoSPWgb1dwBqztpskQGOOjD/fvUVcRvUJgZ4Gh294fmqPhh09gkJbJ3YzZ3uc=; Received: from n2100.armlinux.org.uk ([2001:4d48:ad52:3201:214:fdff:fe10:4f86]:56235) by pandora.armlinux.org.uk with esmtpsa (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from ) id 1bYZci-0007Zb-F9; Sat, 13 Aug 2016 15:09:16 +0100 Received: from linux by n2100.armlinux.org.uk with local (Exim 4.76) (envelope-from ) id 1bYZce-00030g-QD; Sat, 13 Aug 2016 15:09:13 +0100 Date: Sat, 13 Aug 2016 15:09:11 +0100 From: Russell King - ARM Linux To: Liu Ying Subject: Re: [PATCH v3 03/10] drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers Message-ID: <20160813140910.GA11506@n2100.armlinux.org.uk> References: <1467618039-7457-1-git-send-email-gnuiyl@gmail.com> <1467618039-7457-4-git-send-email-gnuiyl@gmail.com> <20160813101154.GA3864@n2100.armlinux.org.uk> <20160813104531.GA4844@n2100.armlinux.org.uk> <20160813112947.GA6718@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20160813112947.GA6718@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.23 (2014-03-12) X-Mailman-Approved-At: Mon, 15 Aug 2016 00:31:38 +0000 Cc: Daniel Vetter , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Okay, this is what I've ended up with - I'm not sure whether it's correct or not, but this dirty patch allows the full series to be applied and still have working userspace. I still need to undo all the reverts I have touching imx-drm between patch 10 of this set and 4.8-rc1... diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 3f5f9566b152..6f9a43880381 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx/ipuv3-plane.c @@ -275,7 +275,7 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, if (WARN_ON(!crtc_state)) return -EINVAL; - /* CRTC should be enabled */ + /* CRTC should be enabled -- why? */ if (!crtc_state->enable) return -EINVAL; @@ -319,10 +319,14 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, * since we cannot touch active IDMAC channels, we do not support * resizing the enabled plane or changing its format */ +#if 0 if (old_fb && (state->src_w != old_state->src_w || state->src_h != old_state->src_h || - fb->pixel_format != old_fb->pixel_format)) + fb->pixel_format != old_fb->pixel_format)) { + printk("%s:%d: fail\n", __func__, __LINE__); return -EINVAL; + } +#endif eba = drm_plane_state_to_eba(state); @@ -332,8 +336,12 @@ static int ipu_plane_atomic_check(struct drm_plane *plane, if (fb->pitches[0] < 1 || fb->pitches[0] > 16384) return -EINVAL; - if (old_fb && fb->pitches[0] != old_fb->pitches[0]) +#if 0 + if (old_fb && fb->pitches[0] != old_fb->pitches[0]) { + printk("%s:%d: fail\n", __func__, __LINE__); return -EINVAL; + } +#endif switch (fb->pixel_format) { case DRM_FORMAT_YUV420: @@ -388,10 +396,14 @@ static void ipu_plane_atomic_update(struct drm_plane *plane, struct drm_plane_state *state = plane->state; enum ipu_color_space ics; +#if 0 if (old_state->fb) { ipu_plane_atomic_set_base(ipu_plane, old_state); return; } +#endif + + ipu_plane_disable(ipu_plane); switch (ipu_plane->dp_flow) { case IPU_DP_FLOW_SYNC_BG: