Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1680480
| Path | csiph.com!weretis.net!feeder4.news.weretis.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Daniel Vetter <daniel@ffwll.ch> |
| Newsgroups | linux.kernel |
| Subject | Re: [Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. |
| Date | Mon, 03 Jul 2017 18:40:01 +0200 |
| Message-ID | <tZcyd-40A-5@gated-at.bofh.it> (permalink) |
| References | <tXlmh-7nt-9@gated-at.bofh.it> <tY4CK-6b8-9@gated-at.bofh.it> <tZ7oS-xQ-37@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=oKineuFn7i9iQRbtdXBdo4dJV+dwij1iVcyt+Wd9wHs=; b=EESMHMK4rxDUUM4KgmAZyzh/zkqyw0doLTWEQndKlAqt4FjKRjAOZW5ry7MSos+9hX +hbne1sM0bivcSxsKHCMvUz1TCRmwWjv+4a62c7VQ8+B9iCOkWI8MvQ07U3hYrk7CO5i EOrsEjYiAGr+QFfJvONXQ/e6LBtgdLhduUJ3E= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=oKineuFn7i9iQRbtdXBdo4dJV+dwij1iVcyt+Wd9wHs=; b=cDKylnKJ1nVWDoSJmb0HeGvfNlEYvCMixPEjGfyDHH8ecyLK+f+fTaxhq8slzNaWve aiqApxCjuW49QbP4tJW9t0WAamd14syav5PS9lH0iSPdjl20TrUxp7PqpG0v4gY4rbc2 Se4oGNNdwVBVKPiiGr0o2ljTekJuGS55nNsv7UBoWZdIGtdjAiQ7axkIG66o+DgukGnu 8s/RiFBdP/5OGECBNBh278Bzrdlo1kukd3iv1MF28PNuc9Awowgep35u7B087w//RoFi 9X9Lv2o5YOyXLmlDBSVEWuev0SYXjEiK3YDWXIvQqE5uZoEQM+1c7Ap2zJu6Do+GSwK+ kbdA== |
| X-Gm-Message-State | AKS2vOz88l9YdSGa73Kls35bLC8seFrPnyIO1R9aqDMqqJZcKOU1NnOP mRxBh/RyZttRw2Em |
| X-Received | by 10.80.213.215 with SMTP id g23mr15658010edj.65.1499099704823; Mon, 03 Jul 2017 09:35:04 -0700 (PDT) |
| Mail-Followup-To | Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>, nouveau@lists.freedesktop.org, Thierry Reding <thierry.reding@gmail.com>, Daniel Vetter <daniel.vetter@intel.com>, Boris Brezillon <boris.brezillon@free-electrons.com>, Jonathan Hunter <jonathanh@nvidia.com>, Tomi Valkeinen <tomi.valkeinen@ti.com>, Ben Skeggs <bskeggs@redhat.com>, CK Hu <ck.hu@mediatek.com>, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Jyri Sarha <jsarha@ti.com>, Matthias Brugger <matthias.bgg@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Philipp Zabel <p.zabel@pengutronix.de>, freedreno@lists.freedesktop.org |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| X-Operating-System | Linux phenom 4.9.0-2-amd64 |
| User-Agent | NeoMutt/20170306 (1.8.0) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 82 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>, nouveau@lists.freedesktop.org, Thierry Reding <thierry.reding@gmail.com>, Daniel Vetter <daniel.vetter@intel.com>, Boris Brezillon <boris.brezillon@free-electrons.com>, Jonathan Hunter <jonathanh@nvidia.com>, Tomi Valkeinen <tomi.valkeinen@ti.com>, Ben Skeggs <bskeggs@redhat.com>, CK Hu <ck.hu@mediatek.com>, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, intel-gfx@lists.freedesktop.org, linux-mediatek@lists.infradead.org, Jyri Sarha <jsarha@ti.com>, Matthias Brugger <matthias.bgg@gmail.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Philipp Zabel <p.zabel@pengutronix.de>, freedreno@lists.freedesktop.org |
| X-Original-Date | Mon, 3 Jul 2017 18:35:01 +0200 |
| X-Original-Message-ID | <20170703163501.cklhozsbj4v5ftev@phenom.ffwll.local> |
| X-Original-References | <20170628132812.14927-1-maarten.lankhorst@linux.intel.com> <20170630135621.c2xlunjaepne2vqt@phenom.ffwll.local> <76319124-3497-f941-73c7-ce6abf084551@linux.intel.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1680480 |
Show key headers only | View raw
On Mon, Jul 03, 2017 at 01:01:55PM +0200, Maarten Lankhorst wrote: > Op 30-06-17 om 15:56 schreef Daniel Vetter: > > On Wed, Jun 28, 2017 at 03:28:11PM +0200, Maarten Lankhorst wrote: > >> We want to change swap_state to wait indefinitely, but to do this > >> swap_state should wait interruptibly. This requires propagating > >> the error to each driver. All drivers have changes to deal with the > >> clean up. In order to allow easy reverting, the commit that changes > >> behavior is separate so someone only has to revert that for testing. > >> > >> Nouveau has a small bugfix, if drm_atomic_helper_wait_for_fences > >> failed cleanup_planes was not called. > >> > >> Cc: Boris Brezillon <boris.brezillon@free-electrons.com> > >> Cc: David Airlie <airlied@linux.ie> > >> Cc: Daniel Vetter <daniel.vetter@intel.com> > >> Cc: Jani Nikula <jani.nikula@linux.intel.com> > >> Cc: Sean Paul <seanpaul@chromium.org> > >> Cc: CK Hu <ck.hu@mediatek.com> > >> Cc: Philipp Zabel <p.zabel@pengutronix.de> > >> Cc: Matthias Brugger <matthias.bgg@gmail.com> > >> Cc: Rob Clark <robdclark@gmail.com> > >> Cc: Ben Skeggs <bskeggs@redhat.com> > >> Cc: Thierry Reding <thierry.reding@gmail.com> > >> Cc: Jonathan Hunter <jonathanh@nvidia.com> > >> Cc: Jyri Sarha <jsarha@ti.com> > >> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> > >> Cc: Eric Anholt <eric@anholt.net> > >> Cc: dri-devel@lists.freedesktop.org > >> Cc: linux-kernel@vger.kernel.org > >> Cc: intel-gfx@lists.freedesktop.org > >> Cc: linux-arm-kernel@lists.infradead.org > >> Cc: linux-mediatek@lists.infradead.org > >> Cc: linux-arm-msm@vger.kernel.org > >> Cc: freedreno@lists.freedesktop.org > >> Cc: nouveau@lists.freedesktop.org > >> Cc: linux-tegra@vger.kernel.org > >> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> > > We kinda need to backport this to older kernels, but I don't really see > > how :( Maybe we should split this up: > > patch 1: Change to int return type > > patches 2-(n-1): Driver conversions > > patch n: __must_check addition > > > > That would at least somewhat make this backportable ... > > > >> --- > >> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 14 ++++++++++++-- > >> drivers/gpu/drm/drm_atomic_helper.c | 18 ++++++++++++------ > >> drivers/gpu/drm/i915/intel_display.c | 10 +++++++++- > >> drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ++++++- > >> drivers/gpu/drm/msm/msm_atomic.c | 14 +++++++++----- > >> drivers/gpu/drm/nouveau/nv50_display.c | 10 ++++++++-- > >> drivers/gpu/drm/tegra/drm.c | 7 ++++++- > >> drivers/gpu/drm/tilcdc/tilcdc_drv.c | 6 +++++- > >> drivers/gpu/drm/vc4/vc4_kms.c | 21 +++++++++++++-------- > >> include/drm/drm_atomic_helper.h | 4 ++-- > >> 10 files changed, 82 insertions(+), 29 deletions(-) > >> > >> diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > >> index 516d9547d331..d4f787bf1d4a 100644 > >> --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > >> +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c > >> @@ -544,9 +544,11 @@ static int atmel_hlcdc_dc_atomic_commit(struct drm_device *dev, > >> goto error; > >> } > >> > >> - /* Swap the state, this is the point of no return. */ > >> - drm_atomic_helper_swap_state(state, true); > > Push the swap_state up over the commit setup (but after the allocation) > > and there's no more a problem with unrolling. > This can't be done higher up because of the interruptible wait. > > Unless we change the patch series to move the waiting for hw_done to a separate step and get rid of the stall argument to swap_state once everything is converted. This could be useful for all drivers that have some kind of setup, because we could move the wait up slightly to suit the drivers needs. right, swap_state (well the swapping part, not the stalling part) must be done as the last step and can't fail. Might be a reason do split them, but not sure that's a good idea either. Please disregard my comment ... -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2017-06-28 15:40 +0200
Re: [Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. Daniel Vetter <daniel@ffwll.ch> - 2017-06-30 16:00 +0200
Re: [Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2017-07-03 13:10 +0200
Re: [Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. Daniel Vetter <daniel@ffwll.ch> - 2017-07-03 18:40 +0200
Re: [Intel-gfx] [PATCH 1/2] drm/atomic: Change drm_atomic_helper_swap_state to return an error. Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2017-07-03 14:10 +0200
csiph-web