[PATCH] drm/vc4: Fix the "no scaling" case on multi-planar YUV formats

2018-07-25 Thread Boris Brezillon
y visible artifact (seen when using modetest and a rather big overlay plane in YUV420). Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Cc: Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 25 - 1 file changed, 12 insertions(+), 13

[PATCH 0/5] drm/vc4: Fix negative X/Y positioning of planes

2018-07-25 Thread Boris Brezillon
Hello Eric, This is an attempt at fixing support for negative X/Y positioning of various FB formats. I kept you as the author since I started from your initial work and fixed a few things + split the changes in several commits. Let me know if that's a problem, and I change the author. This

[PATCH 2/5] drm/vc4: Define missing PICTH0_SINK_PIX field

2018-07-25 Thread Boris Brezillon
From: Eric Anholt This is needed to support X/Y negative placement of planes using T-format buffers. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_regs.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers

[PATCH 1/5] drm/vc4: Fix TILE_Y_OFFSET definitions

2018-07-25 Thread Boris Brezillon
From: Eric Anholt Y_OFFSET field starts at bit 8 not 7. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_regs.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_regs.h b/drivers/gpu/drm/vc4/vc4_regs.h index

[PATCH 4/5] drm/vc4: Move ->offsets[] adjustment out of setup_clipping_and_scaling()

2018-07-25 Thread Boris Brezillon
. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 39e1fa3a8466..2b8ba1c412be 100644

[PATCH 5/5] drm/vc4: Fix negative X/Y positioning of planes using T_TILES modifier

2018-07-25 Thread Boris Brezillon
From: Eric Anholt X/Y positioning of T-format buffers is quite tricky and the current implementation was failing to position a plane using this format correctly when the X, Y or both X and Y offsets were negative. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon --- Hi Eric, I kept

[PATCH 3/5] drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic

2018-07-25 Thread Boris Brezillon
from drm_plane_state. Incidentally, it seems to fix a problem we had with negative X/Y positioning of YUV planes. Signed-off-by: Eric Anholt Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_drv.h | 9 -- drivers/gpu/drm/vc4/vc4_plane.c | 210

Re: [PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()

2018-07-25 Thread Boris Brezillon
On Tue, 24 Jul 2018 15:32:15 +0200 Boris Brezillon wrote: > Async plane update is supposed to work only when updating the FB or FB > position of an already enabled plane. That does not apply to requests > where the plane was previously disabled or assigned to a different > CTRC

Re: [PATCH v2] drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happy

2018-07-25 Thread Boris Brezillon
On Tue, 24 Jul 2018 15:33:00 +0200 Boris Brezillon wrote: > drm_atomic_helper_async_check() declares the plane, old_plane_state and > new_plane_state variables to iterate over all planes of the atomic > state and make sure only one plane is enabled. > > Unfortunately gcc is n

Re: [PATCH] drm/vc4: Reset ->{x,y}_scaling[1] when dealing with uniplanar formats

2018-07-25 Thread Boris Brezillon
On Tue, 24 Jul 2018 15:36:01 +0200 Boris Brezillon wrote: > This is needed to ensure ->is_unity is correct when the plane was > previously configured to output a multi-planar format with scaling > enabled, and is then being reconfigured to output a uniplanar format. > > F

[PATCH] drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats

2018-07-24 Thread Boris Brezillon
This is needed to ensure ->is_unity is correct when the plane was previously configured to output a multi-planar format with scaling enabled, and is then being reconfigured to output a uniplanar format. Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Cc: Signed-

[PATCH v2] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()

2018-07-24 Thread Boris Brezillon
wed. Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt --- Changes in v2: - Cc stable - Add Eric's R-b --- drivers/gpu/drm/drm_atomic_helper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-

[PATCH v2] drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happy

2018-07-24 Thread Boris Brezillon
that plane, new_plane_state and old_plane_state are initialized. Explicitly initialize those variables to NULL to make gcc happy. Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Sean Paul --- Changes in v2: -

Re: backlight - chicken and egg challenge

2018-09-10 Thread Boris Brezillon
Hi Sam, On Sat, 8 Sep 2018 22:17:55 +0200 Sam Ravnborg wrote: > Hi all. > > When working on the DRM driver for Atmel LCDC the first approach > was to use a MFD driver, that had two sub-drivers: > - PWM dirver > - DRM driver > > Feedback was that the PWM feature was too small to warrant a MFD

Re: [PATCH] drm/writeback: Fix the "overview" section of the doc

2018-07-07 Thread Boris Brezillon
On Tue, 3 Jul 2018 19:40:46 +0200 Boris Brezillon wrote: > Fix the bullet list declaration in the overview section. > > Signed-off-by: Boris Brezillon Applied to drm-misc-next. > --- > drivers/gpu/drm/drm_writeback.c | 11 +++ > 1 file changed, 7 insertio

Re: [PATCH v4 0/8] drm/vc4: Add support for the transposer IP

2018-07-07 Thread Boris Brezillon
On Tue, 3 Jul 2018 09:50:14 +0200 Boris Brezillon wrote: > Hello, > > This is the third version of this series adding writeback support > to the VC4 display engine. > > This version is based on drm-misc-next and include a bunch of > modifications to the core that I had t

[PATCH] drm/writeback: Fix the "overview" section of the doc

2018-07-03 Thread Boris Brezillon
Fix the bullet list declaration in the overview section. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_writeback.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_writeback.c b/drivers/gpu/drm/drm_writeback.c index 827395071f0b

Re: [PATCH] drm/writeback: Fix the "overview" section of the doc

2018-07-03 Thread Boris Brezillon
On Tue, 3 Jul 2018 19:40:46 +0200 Boris Brezillon wrote: > Fix the bullet list declaration in the overview section. > > Signed-off-by: Boris Brezillon Forgot to add: Reported-by: Daniel Vetter > --- > drivers/gpu/drm/drm_writeback.c | 11 +++ > 1 file changed,

Re: [PATCH] drm/writeback: Fix the "overview" section of the doc

2018-07-03 Thread Boris Brezillon
On Tue, 3 Jul 2018 19:44:00 +0200 Boris Brezillon wrote: > On Tue, 3 Jul 2018 19:40:46 +0200 > Boris Brezillon wrote: > > > Fix the bullet list declaration in the overview section. > > > > Signed-off-by: Boris Brezillon > > Forgot to add: > >

Re: [PATCH v2] drm/vc4: Expose performance counters to userspace

2018-01-12 Thread Boris Brezillon
On Thu, 11 Jan 2018 16:35:08 -0800 Eric Anholt wrote: > Could we add some docs for get_values? Like: Sure. > > /* > * Returns the values of the performance counters tracked by this > * perfmon (as an array of ncounters u64 values). > * > * No implicit synchronization is

[PATCH v6 1/2] drm/bridge: Add Cadence DSI driver

2018-04-10 Thread Boris Brezillon
From: Boris Brezillon <boris.brezil...@free-electrons.com> Add a driver for Cadence DPI -> DSI bridge. This driver only support a subset of Cadence DSI bridge capabilities. This driver has been tested/debugged in a simulated environment which explains why some of the features are missi

[PATCH v6 2/2] dt-bindings: drm/bridge: Document Cadence DSI bridge bindings

2018-04-10 Thread Boris Brezillon
From: Boris Brezillon <boris.brezil...@free-electrons.com> Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> --- Hello Rob, I dropped your Acked-by because this version now documents the DPHY bindings. Reg

Re: [PATCH] drm/vc4: Fix leak of the file_priv that stored the perfmon.

2018-04-12 Thread Boris Brezillon
On Mon, 9 Apr 2018 13:58:13 -0700 Eric Anholt <e...@anholt.net> wrote: > Signed-off-by: Eric Anholt <e...@anholt.net> > Fixes: 65101d8c9108 ("drm/vc4: Expose performance counters to userspace") Reviewed-by: Boris Brezillon <boris.brezil...@bootlin.com> >

Re: [PATCH v2 4/6] drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes

2018-04-18 Thread Boris Brezillon
On Tue, 17 Apr 2018 15:10:50 +0200 Peter Rosin wrote: > This beats the heuristic that the connector is involved in what format > should be output for cases where this fails. > > E.g. if there is a bridge that changes format between the encoder and the > connector, or if some of

Re: [PATCH v2 6/6] drm/atmel-hlcdc: fix broken release date

2018-04-18 Thread Boris Brezillon
On Tue, 17 Apr 2018 15:10:52 +0200 Peter Rosin wrote: > Bump the minor version while at it. > > Signed-off-by: Peter Rosin > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git

Re: [PATCH v2 2/6] dt-bindings: display: atmel: optional video-interface of endpoints

2018-04-18 Thread Boris Brezillon
Hi Peter, On Tue, 17 Apr 2018 15:10:48 +0200 Peter Rosin wrote: > With bus-type/bus-width properties in the endpoint nodes, the video- > interface of the connection can be specified for cases where the > heuristic fails to select the correct output mode. This can happen > e.g.

Re: [PATCH v2 5/6] drm/atmel-hlcdc: add support for connecting to tda998x HDMI encoder

2018-04-18 Thread Boris Brezillon
e *dev); > > int atmel_hlcdc_create_outputs(struct drm_device *dev); > > +struct component_match; > +int atmel_hlcdc_add_component_encoder(struct drm_device *dev); > +int atmel_hlcdc_get_external_components(struct device *dev, > + struct

Re: [PATCH v2 2/6] dt-bindings: display: atmel: optional video-interface of endpoints

2018-04-18 Thread Boris Brezillon
On Wed, 18 Apr 2018 09:31:53 +0200 Peter Rosin <p...@axentia.se> wrote: > On 2018-04-18 09:16, Boris Brezillon wrote: > > Hi Peter, > > > > On Tue, 17 Apr 2018 15:10:48 +0200 > > Peter Rosin <p...@axentia.se> wrote: > > > >> With bus-type

Re: [PATCH] drm/atomic: Add sanity checks to drm_atomic_helper_async_commit()

2018-04-18 Thread Boris Brezillon
On Fri, 30 Mar 2018 16:55:18 +0200 Boris Brezillon <boris.brezil...@bootlin.com> wrote: > ->atomic_async_update() requires that drivers update the plane->state > object before returning. Make sure at least common properties have been > updated. > > Cc: Gustavo P

Re: [PATCH v2 4/6] drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes

2018-04-18 Thread Boris Brezillon
On Wed, 18 Apr 2018 09:46:09 +0200 Peter Rosin <p...@axentia.se> wrote: > On 2018-04-18 09:29, Boris Brezillon wrote: > > On Tue, 17 Apr 2018 15:10:50 +0200 > > Peter Rosin <p...@axentia.se> wrote: > > > >> This beats the heuristic that the connec

Re: [PATCH v2 5/6] drm/atmel-hlcdc: add support for connecting to tda998x HDMI encoder

2018-04-18 Thread Boris Brezillon
On Wed, 18 Apr 2018 10:02:12 +0200 Peter Rosin <p...@axentia.se> wrote: > On 2018-04-18 09:36, Boris Brezillon wrote: > > On Tue, 17 Apr 2018 15:10:51 +0200 > > Peter Rosin <p...@axentia.se> wrote: > > > >> When the of-graph points to a

Re: [PATCH v6 1/2] drm/bridge: Add Cadence DSI driver

2018-04-21 Thread Boris Brezillon
Hi Archit, On Sun, 15 Apr 2018 13:39:44 +0530 Archit Taneja wrote: > > +static int cdns_dsi_get_dphy_pll_cfg(struct cdns_dphy *dphy, > > +struct cdns_dphy_cfg *cfg, > > +unsigned int dpi_htotal, > > +

[PATCH v8 1/2] drm/bridge: Add Cadence DSI driver

2018-04-21 Thread Boris Brezillon
ode * DPHY init/configuration steps * support for additional input interfaces (SDI input) DSI commands and non-burst video mode have been tested. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> Reviewed-by: Andrzej Hajda <a.ha...@samsung.com> Acked-by: Eric Anholt &

[PATCH v8 2/2] dt-bindings: drm/bridge: Document Cadence DSI bridge bindings

2018-04-21 Thread Boris Brezillon
Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> Reviewed-by: Rob Herring <r...@kernel.org> --- Changes in v8: - Update my email address Changes in v7: - Add Rob's R-b Changes in v6: - Document the DPHY bindings - Dr

[PATCH v7 2/2] dt-bindings: drm/bridge: Document Cadence DSI bridge bindings

2018-04-21 Thread Boris Brezillon
From: Boris Brezillon <boris.brezil...@free-electrons.com> Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon <boris.brezil...@free-electrons.com> Reviewed-by: Rob Herring <r...@kernel.org> --- Changes in v7: - Add Rob's R-b Changes in v6: -

[PATCH v7 1/2] drm/bridge: Add Cadence DSI driver

2018-04-21 Thread Boris Brezillon
From: Boris Brezillon <boris.brezil...@free-electrons.com> Add a driver for Cadence DPI -> DSI bridge. This driver only support a subset of Cadence DSI bridge capabilities. This driver has been tested/debugged in a simulated environment which explains why some of the features are missi

Re: [PATCH v3 4/7] drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes

2018-04-21 Thread Boris Brezillon
On Thu, 19 Apr 2018 18:27:48 +0200 Peter Rosin wrote: > This beats the heuristic that the connector is involved in what format > should be output for cases where this fails. > > E.g. if there is a bridge that changes format between the encoder and the > connector, or if some of

Re: [PATCH v8 1/2] drm/bridge: Add Cadence DSI driver

2018-04-23 Thread Boris Brezillon
On Sat, 21 Apr 2018 09:08:45 +0200 Boris Brezillon <boris.brezil...@bootlin.com> wrote: > Add a driver for Cadence DPI -> DSI bridge. > > This driver only support a subset of Cadence DSI bridge capabilities. > > This driver has been tested/debugged in a simulated envi

Re: [PATCH v4 3/8] drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes

2018-04-23 Thread Boris Brezillon
e around depending on the selected output mode. For > devices that do not have the "conflicting output formats" issue > (SAMA5D2, SAMA5D4), this is completely irrelevant. > > Signed-off-by: Peter Rosin <p...@axentia.se> Acked-by: Boris Brezillon <boris.brezil...

Re: [PATCH v4 2/8] dt-bindings: display: atmel: optional video-interface of endpoints

2018-04-23 Thread Boris Brezillon
bits move around depending on the selected output mode. For > devices that do not have the "conflicting output formats" issue > (SAMA5D2, SAMA5D4), this is completely irrelevant. > > Signed-off-by: Peter Rosin <p...@axentia.se> Acked-by: Boris Brezillon <boris.br

Re: [PATCH] drm/atmel-hlcdc: add command line option to specify preferred depth

2018-03-28 Thread Boris Brezillon
referred_depth) { > + case 0: /* driver default */ > + case 8: > + case 16: > + case 24: > + break; > + default: > + return -EINVAL; > + } > + > ddev = drm_dev_alloc(_hlcdc_dc_driver, >dev); > if (IS_ERR(ddev)) > return PTR_ERR(ddev); -- Boris Brezillon, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] drm/atmel-hlcdc: add command line option to specify preferred depth

2018-03-28 Thread Boris Brezillon
On Wed, 28 Mar 2018 14:22:36 +0200 Daniel Vetter <dan...@ffwll.ch> wrote: > On Wed, Mar 28, 2018 at 09:34:54AM +0200, Boris Brezillon wrote: > > Hi Peter, > > > > On Mon, 26 Mar 2018 09:35:02 +0200 > > Peter Rosin <p...@axentia.se> wrote: > > &g

[PATCH v7] drm/vc4: update cursors asynchronously through atomic

2018-03-30 Thread Boris Brezillon
FB has been applied to the HW to avoid possible use-after-free issues v6: add missing drm_atomic_set_fb_for_plane() in vc4_plane_atomic_async_update() (Boris Brezillon) v5: add missing call to vc4_plane_atomic_check() (Eric Anholt) v4: add drm_atomic_helper_async() commit (Eric Anhol

[PATCH] drm/atomic: Add sanity checks to drm_atomic_helper_async_commit()

2018-03-30 Thread Boris Brezillon
->atomic_async_update() requires that drivers update the plane->state object before returning. Make sure at least common properties have been updated. Cc: Gustavo Padovan <gust...@padovan.org> Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- Hello, This is a

Re: [RFC 1/2] drm/vc4: Handle async page flips in the atomic_commit() path

2018-03-30 Thread Boris Brezillon
On Fri, 30 Mar 2018 17:09:03 +0200 Boris Brezillon <boris.brezil...@bootlin.com> wrote: > Rework the atomic commit logic to handle async page flip requests in > the atomic update path. > > Async page flips are a bit more complicated than async cursor updates

[RFC 0/2] drm/vc4: Async page flip cleanup

2018-03-30 Thread Boris Brezillon
in drm_atomic_helper.c. Also, I'd like to have feedback from Padovan, Daniel and maybe others who have already thought about handling async page flips generically. And the last reason is that it's not been extensively tested, so it may not work correctly :-). Regards, Boris Boris Brezillon (2): drm/vc4: Handle

[RFC 2/2] drm/vc4: Get rid of vc4_queue_seqno_cb() and its dependencies

2018-03-30 Thread Boris Brezillon
The last user of vc4_queue_seqno_cb() (async page flip handling code) is gone. Get rid of this function and all the related structs and fields. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- drivers/gpu/drm/vc4/vc4_drv.h | 14 -- drivers/gpu/drm/vc4/vc4_gem.

[RFC 1/2] drm/vc4: Handle async page flips in the atomic_commit() path

2018-03-30 Thread Boris Brezillon
and its dependencies and use drm_atomic_helper_page_flip() instead. Signed-off-by: Boris Brezillon <boris.brezil...@bootlin.com> --- drivers/gpu/drm/vc4/vc4_crtc.c | 103 + drivers/gpu/drm/vc4/vc4_kms.c | 101 +--- 2

[PATCH] drm/vc4: update cursors asynchronously through atomic

2018-03-29 Thread Boris Brezillon
_plane() in vc4_plane_atomic_async_update() (Boris Brezillon) v5: add missing call to vc4_plane_atomic_check() (Eric Anholt) v4: add drm_atomic_helper_async() commit (Eric Anholt) v3: move size checks back to drivers (Ville Syrjälä) v2: move fb setting to core and use new state (Eric Anholt) Cc: Eric Anholt <e...@a

Re: [PATCH] drm/core: Remove drm_dev_unref() and it's uses

2018-04-26 Thread Boris Brezillon
| 4 ++-- > drivers/gpu/drm/arc/arcpgu_drv.c | 4 ++-- > drivers/gpu/drm/armada/armada_drv.c| 6 +++--- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- For atmel-hlcdc: Acked-by: Boris Brezillon <boris.brezil...@bootlin.com>

[PATCH v2 2/8] drm/connector: Pass a drm_connector_state to ->atomic_commit()

2018-06-29 Thread Boris Brezillon
Other atomic hooks are passed state objects, let's change this one to be consistent. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_atomic_helper.c | 2 +- include/drm/drm_modeset_helper_vtables.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu

[PATCH v2 0/8] drm/vc4: Add support for the transposer IP

2018-06-29 Thread Boris Brezillon
, no much has changed except I modified a bit the implementation to adjust the latest revision of the writeback interface. Regards, Boris Boris Brezillon (8): drm/atomic: Avoid connector to writeback_connector casts drm/connector: Pass a drm_connector_state to ->atomic_commit() drm/vc4:

[PATCH v2 4/8] drm/crtc: Add a generic infrastructure to fake VBLANK events

2018-06-29 Thread Boris Brezillon
ore drm_atomic_helper_fake_vblank() helper can then be used to fake VBLANKs at commit time. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_atomic_helper.c | 40 + include/drm/drm_atomic_helper.h | 1 + include/drm/drm_crtc.h |

[PATCH v2 8/8] ARM: dts: bcm283x: Add Transposer block

2018-06-29 Thread Boris Brezillon
From: Boris Brezillon The transposer block is allowing one to write the result of the VC4 composition back to memory instead of displaying it on a screen. Signed-off-by: Boris Brezillon --- arch/arm/boot/dts/bcm283x.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot

[PATCH v2 3/8] drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks()

2018-06-29 Thread Boris Brezillon
the only thing we want to check when calling drm_atomic_helper_wait_for_vblanks() from vc4_atomic_complete_commit() is that new FBs are in use and the old ones can be safely released. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_kms.c | 11 +-- 1 file changed, 1 insertion

[PATCH v2 6/8] drm/vc4: Call drm_atomic_helper_fake_vblank() in the commit path

2018-06-29 Thread Boris Brezillon
Mimic what is done in drm_atomic_commit_tail() and call drm_atomic_helper_fake_vblank() so that VBLANK events are faked when the drm_crtc_state.no_vblank is true. Will be needed when we'll add support for the transposer block. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_kms.c | 2

[PATCH v2 1/8] drm/atomic: Avoid connector to writeback_connector casts

2018-06-29 Thread Boris Brezillon
Use container_of() instead of type casting so that it keeps working even if base is moved inside the drm_writeback_connector struct. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_atomic.c | 4 +++- include/drm/drm_writeback.h | 6 ++ 2 files changed, 9 insertions(+), 1 deletion

[PATCH v2 5/8] drm/atomic: Call drm_atomic_helper_fake_vblank() from the generic commit_tail() helpers

2018-06-29 Thread Boris Brezillon
Now that we have a way to fake VBLANK events when requested by the CRTC hook it up to the generic commit_tail() helpers. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_atomic_helper.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers

[PATCH v2 7/8] drm/vc4: Add support for the transposer block

2018-06-29 Thread Boris Brezillon
From: Boris Brezillon The transposer block is providing support for mem-to-mem composition, which is exposed as a drm_writeback connector in DRM. Add a driver to support this feature. Signed-off-by: Boris Brezillon --- .../devicetree/bindings/display/brcm,bcm-vc4.txt | 6 + drivers/gpu

[PATCH v2 0/8] drm/vc4: Add support for the transposer IP

2018-06-29 Thread Boris Brezillon
, no much has changed except I modified a bit the implementation to adjust the latest revision of the writeback interface. Regards, Boris Boris Brezillon (8): drm/atomic: Avoid connector to writeback_connector casts drm/connector: Pass a drm_connector_state to ->atomic_commit() drm/vc4:

Re: [PATCH 1/4] drm/v3d: Fix a use-after-free race accessing the scheduler's fences.

2018-10-08 Thread Boris Brezillon
still close the race. > > Signed-off-by: Eric Anholt > Fixes: 57692c94dcbe ("drm/v3d: Introduce a new DRM driver for Broadcom V3D > V3.x+") Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/v3d/v3d_drv.h | 5 + > drivers/gpu/drm/v3d/v3d_gem.c | 8 +

[RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-16 Thread Boris Brezillon
of the memory bus. Same goes for the HVS limit, except the margin is smaller in this case, since the HVS is not used by external components. Signed-off-by: Boris Brezillon --- This logic has been validated using a simple shell script and some instrumentation in the VC4 driver: - capture underflow errors

[PATCH v3] drm/atomic: integrate modeset lock with private objects

2018-10-22 Thread Boris Brezillon
From: Rob Clark Follow the same pattern of locking as with other state objects. This avoids boilerplate in the driver. Signed-off-by: Rob Clark Signed-off-by: Boris Brezillon Reviewed-by: Daniel Vetter --- Changes in v3: - Improve doc as suggested by Daniel - Add Daniel's R-b Changes in v2

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-23 Thread Boris Brezillon
Hi Daniel, On Tue, 16 Oct 2018 14:57:43 +0200 Daniel Vetter wrote: > On Tue, Oct 16, 2018 at 11:40:45AM +0200, Boris Brezillon wrote: > > The HVS block is supposed to fill the pixelvalve FIFOs fast enough to > > meet the requested framerate. The problem is, the HVS and memory bus

[PATCH v2] drm/atomic: integrate modeset lock with private objects

2018-10-19 Thread Boris Brezillon
From: Rob Clark Follow the same pattern of locking as with other state objects. This avoids boilerplate in the driver. Signed-off-by: Rob Clark Signed-off-by: Boris Brezillon --- Changes in v2: - Make sure all priv objs are locked from drm_modeset_lock_all_ctx(). This implies adding all

[PATCH] drm/sun4i: Fix an ulong overflow in the dotclock driver

2018-10-18 Thread Boris Brezillon
The calculated ideal rate can easily overflow an unsigned long, thus making the best div selection buggy as soon as no ideal match is found before the overflow occurs. Fixes: 4731a72df273 ("drm/sun4i: request exact rates to our parents") Cc: Signed-off-by: Boris Brezillon --- drive

[PATCH v2] drm/sun4i: Fix an ulong overflow in the dotclock driver

2018-10-18 Thread Boris Brezillon
The calculated ideal rate can easily overflow an unsigned long, thus making the best div selection buggy as soon as no ideal match is found before the overflow occurs. Fixes: 4731a72df273 ("drm/sun4i: request exact rates to our parents") Cc: Signed-off-by: Boris Brezillon Acked-

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-16 Thread Boris Brezillon
Hi Daniel, On Tue, 16 Oct 2018 14:57:43 +0200 Daniel Vetter wrote: > On Tue, Oct 16, 2018 at 11:40:45AM +0200, Boris Brezillon wrote: > > The HVS block is supposed to fill the pixelvalve FIFOs fast enough to > > meet the requested framerate. The problem is, the HVS and memory bus

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-17 Thread Boris Brezillon
+Rob On Tue, 16 Oct 2018 18:41:51 +0200 Daniel Vetter wrote: > On Tue, Oct 16, 2018 at 04:28:09PM +0300, Ville Syrjälä wrote: > > On Tue, Oct 16, 2018 at 03:12:54PM +0200, Daniel Vetter wrote: > > > On Tue, Oct 16, 2018 at 3:10 PM Boris Brezillon > > > wrote:

Re: [PATCH 2/3] drm/vc4: Force ->x_scaling[1] should never be set to VC4_SCALING_NONE

2018-10-24 Thread Boris Brezillon
In the subject: s/Force// On Wed, 24 Oct 2018 12:05:04 +0200 Boris Brezillon wrote: > For the YUV conversion to work properly, ->x_scaling[0,1] should never > be set to VC4_SCALING_NONE, but vc4_get_scaling_mode() might return > VC4_SCALING_NONE if the horizontal scaling ratio exa

[PATCH 3/3] drm/vc4: Prefer PPF over TPZ when dst >= 2/3 src

2018-10-24 Thread Boris Brezillon
The HVS spec recommends using PPF when the downscaling ratio is between 2/3 and 1. Let's modify vc4_get_scaling_mode() to follow this recommendation. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

[PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled

2018-10-24 Thread Boris Brezillon
that. Fixes: 658d8cbd07da ("drm/vc4: Fix the "no scaling" case on multi-planar YUV formats") Cc: Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drive

[PATCH 2/3] drm/vc4: Force ->x_scaling[1] should never be set to VC4_SCALING_NONE

2018-10-24 Thread Boris Brezillon
PPF when that happens. Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.") Signed-off-by: Boris Brezillon --- The Cc-stable tag has been omitted on purpose: a few things have changed in this portion of code and backporting this fix is not trivial. Since noone complained

Re: [PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled

2018-10-24 Thread Boris Brezillon
On Wed, 24 Oct 2018 12:05:03 +0200 Boris Brezillon wrote: > The source image might be only vertically scaled, and in this case > ->is_unity will be false, but we'd still have to force ->x_scaling[0] > to VC4_SCALING_PPF for YUV conversion to work properly. > > Let's r

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-26 Thread Boris Brezillon
On Fri, 26 Oct 2018 15:30:26 +0200 Daniel Vetter wrote: > On Thu, Oct 25, 2018 at 11:41:14AM +0200, Boris Brezillon wrote: > > On Thu, 25 Oct 2018 11:33:14 +0200 > > Daniel Vetter wrote: > > > > > On Thu, Oct 25, 2018 at 10:09:31AM +0200, Boris Brezillon wrote:

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-26 Thread Boris Brezillon
On Fri, 26 Oct 2018 16:26:03 +0200 Daniel Vetter wrote: > On Fri, Oct 26, 2018 at 3:57 PM Boris Brezillon > wrote: > > > > On Fri, 26 Oct 2018 15:30:26 +0200 > > Daniel Vetter wrote: > > > > > On Thu, Oct 25, 2018 at 11:41:14AM +0200, Boris Brezillon

Re: [PATCH v2 1/3] drm/atomic: Add a generic infrastructure to track underrun errors

2018-10-26 Thread Boris Brezillon
Hi Daniel, On Fri, 26 Oct 2018 12:33:37 +0200 Daniel Vetter wrote: > On Thu, Oct 25, 2018 at 02:45:44PM +0200, Boris Brezillon wrote: > > Display controllers usually provide a lot features like overlay planes, > > hardware scalers, hardware rotations, ... > > Most of th

Re: [PATCH v2 1/3] drm/atomic: Add a generic infrastructure to track underrun errors

2018-10-26 Thread Boris Brezillon
On Fri, 26 Oct 2018 15:36:15 +0200 Daniel Vetter wrote: > On Fri, Oct 26, 2018 at 02:36:56PM +0200, Boris Brezillon wrote: > > Hi Daniel, > > > > On Fri, 26 Oct 2018 12:33:37 +0200 > > Daniel Vetter wrote: > > > > > On Thu, Oct 25, 2018

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-29 Thread Boris Brezillon
On Mon, 29 Oct 2018 10:03:01 +0100 Daniel Vetter wrote: > On Mon, Oct 29, 2018 at 09:41:36AM +0100, Boris Brezillon wrote: > > On Mon, 29 Oct 2018 09:06:40 +0100 > > Daniel Vetter wrote: > > > > > On Fri, Oct 26, 2018 at 06:10:03PM +0300, Ville Syrjälä wrote:

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-29 Thread Boris Brezillon
On Mon, 29 Oct 2018 09:06:40 +0100 Daniel Vetter wrote: > On Fri, Oct 26, 2018 at 06:10:03PM +0300, Ville Syrjälä wrote: > > On Fri, Oct 26, 2018 at 04:52:33PM +0200, Boris Brezillon wrote: > > > On Fri, 26 Oct 2018 16:26:03 +0200 > > > Daniel Vetter wrote: >

[PATCH v2 2/3] drm/vc4: Report underrun errors

2018-10-25 Thread Boris Brezillon
The DRM framework provides a generic way to report underrun errors. Let's implement the necessary hooks to support it in the VC4 driver. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- drivers/gpu/drm/vc4/vc4_drv.h | 3 ++ drivers/gpu/drm/vc4/vc4_hvs.c | 71

[PATCH v2 1/3] drm/atomic: Add a generic infrastructure to track underrun errors

2018-10-25 Thread Boris Brezillon
it means the load tracking algorithm needs some tweaking/fixing. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- drivers/gpu/drm/drm_atomic.c| 12 +++ drivers/gpu/drm/drm_atomic_helper.c | 4 +++ include/drm/drm_atomic_helper.h | 53

[PATCH v2 3/3] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-25 Thread Boris Brezillon
of the memory bus. Same goes for the HVS limit, except the margin is smaller in this case, since the HVS is not used by external components. Signed-off-by: Boris Brezillon --- Changes in v2: - Remove an unused var in vc4_load_tracker_atomic_check() --- drivers/gpu/drm/vc4/vc4_drv.c | 1 + drivers/gpu

[PATCH v2 0/3] drm/vc4: Add a load tracker

2018-10-25 Thread Boris Brezillon
removal). Regards, Boris Boris Brezillon (3): drm/atomic: Add a generic infrastructure to track underrun errors drm/vc4: Report underrun errors drm/vc4: Add a load tracker to prevent HVS underflow errors drivers/gpu/drm/drm_atomic.c| 12 +++ drivers/gpu/drm/drm_atomic_helper.c

Re: [PATCH v2 6/9] drm/atmel-hlcdc: Use drm_fbdev_generic_setup()

2018-10-25 Thread Boris Brezillon
his is done to highlight the fact that fbdev emulation is an > internal client that makes use of the driver, it is not part of the > driver as such. If fbdev setup fails, an error is printed, but the driver > succeeds probing. > > Cc: Boris Brezillon > Signed-off-by: Noralf Trønnes &

Re: [PATCH v2 3/3] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-11-05 Thread Boris Brezillon
Hi Eric, On Tue, 30 Oct 2018 16:12:55 -0700 Eric Anholt wrote: > > + > > + /* The abolsute limit is 2Gbyte/sec, but let's take a margin to let > > "absolute" Will fix the typo. > > > +* the system work when other blocks are accessing the memory. > > +*/ > > + if

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-25 Thread Boris Brezillon
On Thu, 25 Oct 2018 11:33:14 +0200 Daniel Vetter wrote: > On Thu, Oct 25, 2018 at 10:09:31AM +0200, Boris Brezillon wrote: > > On Tue, 23 Oct 2018 15:44:43 +0200 > > Daniel Vetter wrote: > > > > > On Tue, Oct 23, 2018 at 09:55:08AM +0200, Boris Brezil

Re: [RFC PATCH] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-10-25 Thread Boris Brezillon
On Tue, 23 Oct 2018 15:44:43 +0200 Daniel Vetter wrote: > On Tue, Oct 23, 2018 at 09:55:08AM +0200, Boris Brezillon wrote: > > Hi Daniel, > > > > On Tue, 16 Oct 2018 14:57:43 +0200 > > Daniel Vetter wrote: > > > > > On Tue, Oct 16, 2018

Re: [PATCH v3] drm/bridge/sii902x: Fix EDID readback

2018-11-07 Thread Boris Brezillon
primitives. > > Signed-off-by: Fabrizio Castro Acked-by: Boris Brezillon > > --- > v2->v3: > * Incorporated comments from Boris Brezillon and Peter Rosin > > v1->v2: > * Incorporated comments from Peter Rosin > > drivers/gpu/drm/bridge/sii902x.c | 247

Re: [PATCH v2] drm/bridge/sii902x: Fix EDID readback

2018-11-05 Thread Boris Brezillon
Hi Fabrizio, Thanks for working on that. I think your solution fixes the issue we had on atmel boards [1] in a clean way (still have to find some time to test it). On Mon, 5 Nov 2018 13:56:48 + Fabrizio Castro wrote: > @@ -441,6 +558,9 @@ static int sii902x_remove(struct i2c_client

Re: [PATCH 1/3] drm/vc4: Set PPF scaling when the source image is only vertically scaled

2018-11-08 Thread Boris Brezillon
On Wed, 07 Nov 2018 09:08:02 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > On Wed, 24 Oct 2018 12:05:03 +0200 > > Boris Brezillon wrote: > > > >> The source image might be only vertically scaled, and in this case > >> ->is_unit

Re: [PATCH 2/3] drm/vc4: Force ->x_scaling[1] should never be set to VC4_SCALING_NONE

2018-11-08 Thread Boris Brezillon
On Thu, 08 Nov 2018 06:52:44 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > For the YUV conversion to work properly, ->x_scaling[0,1] should never > > be set to VC4_SCALING_NONE, but vc4_get_scaling_mode() might return > > VC4_SCALING_NONE if the horiz

Re: [PATCH 2/3] drm/vc4: Force ->x_scaling[1] should never be set to VC4_SCALING_NONE

2018-11-12 Thread Boris Brezillon
On Mon, 12 Nov 2018 10:20:35 + Dave Stevenson wrote: > Hi Boris & Eric. > > On Thu, 8 Nov 2018 at 15:12, Eric Anholt wrote: > > > > Boris Brezillon writes: > > > > > On Thu, 08 Nov 2018 06:52:44 -0800 > > > Eric Anho

Re: [PATCH 3/4] drm/v3d: Clean up the reservation object setup.

2018-11-13 Thread Boris Brezillon
On Thu, 8 Nov 2018 08:16:53 -0800 Eric Anholt wrote: > The extra to_v3d_bo() calls came from copying this from the vc4 > driver, which stored the cma gem object in the structs. > > Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/

Re: [PATCH 1/4] drm/v3d: Fix whitespace inconsistency in the header.

2018-11-13 Thread Boris Brezillon
On Thu, 8 Nov 2018 08:16:51 -0800 Eric Anholt wrote: Maybe you could add a short description here to avoid having an empty commit message. > Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon > --- > include/uapi/drm/v3d_drm.h | 4 ++-- > 1 file changed, 2 insertions(+),

Re: [PATCH 2/4] drm/v3d: Update a comment about what uses v3d_job_dependency().

2018-11-13 Thread Boris Brezillon
On Thu, 8 Nov 2018 08:16:52 -0800 Eric Anholt wrote: > I merged bin and render's paths in a late refactoring. > > Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/v3d/v3d_sched.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(

[PATCH 1/2] drm/vc4: Fix NULL pointer dereference in the async update path

2018-11-13 Thread Boris Brezillon
nd reset it to NULL after vc4_plane_atomic_check() as returned. Fixes: 58a6a36fe8e0 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git

[PATCH 2/2] drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates

2018-11-13 Thread Boris Brezillon
o prevent this auto-completion. Fixes: 184d3cf4f738 ("drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks()") Cc: Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_kms.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gp

Re: [PATCH 2/2] drm/atomic: Create and use __drm_atomic_helper_crtc_reset() everywhere

2018-11-12 Thread Boris Brezillon
Liviu Dudau > Cc: Brian Starkey > Cc: Mali DP Maintainers > Cc: Boris Brezillon > Cc: Nicolas Ferre > Cc: Alexandre Belloni > Cc: Ludovic Desroches > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Sean Paul > Cc: Jani Nikula > Cc: Joonas Lahtinen > C

Re: [PATCH 1/2] drm/vc4: Fix NULL pointer dereference in the async update path

2018-11-13 Thread Boris Brezillon
On Tue, 13 Nov 2018 13:24:07 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > vc4_plane_atomic_async_update() calls vc4_plane_atomic_check() > > which in turn calls vc4_plane_setup_clipping_and_scaling(), and since > > commit 58a

<    5   6   7   8   9   10   11   12   13   14   >