[PATCH v2 0/4] drm/connector: Provide generic support for underscan

2018-05-11 Thread Boris Brezillon
in the core and add ->underscan fields to drm_connector_state. In this v2, I also converted the nouveau driver to the generic approach. The amdgpu and radeon ones can't be converted since they're still not converted to the atomic interface. Regards, Boris Boris Brezillon (4):

[PATCH v2 1/4] drm/connector: Add generic underscan properties

2018-05-11 Thread Boris Brezillon
the property parsing logic can be shared by all DRM drivers. A driver can now attach underscan properties to its connector through the drm_connector_attach_underscan_properties() helper, and can check/apply the underscan setup based on the drm_connector_state->underscan fields. Signed-off-by: B

[PATCH v2 4/4] drm/nouveau: Switch to the generic underscan props

2018-05-11 Thread Boris Brezillon
Now that underscan props can be parsed by the core and assigned to conn_state->underscan.xxx, we can rely on this implementation and get rid of the nouveau-specific underscan props. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/nouveau/nouveau_connector.c |

[PATCH v2 3/4] drm/vc4: Attach underscan props to the HDMI connector

2018-05-11 Thread Boris Brezillon
,right,top,bottom} properties defined in config.txt and parsed by the VC4 firmware. Signed-off-by: Boris Brezillon --- Changes in v2: - none --- drivers/gpu/drm/vc4/vc4_hdmi.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu

Re: [PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes

2018-05-11 Thread Boris Brezillon
On Fri, 11 May 2018 18:34:50 +0300 Ville Syrjälä wrote: > On Fri, May 11, 2018 at 04:59:17PM +0200, Boris Brezillon wrote: > > Applying an underscan setup is just a matter of scaling all planes > > appropriately and adjusting the CRTC X/Y offset to account for the > > ho

Re: [PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes

2018-05-11 Thread Boris Brezillon
On Fri, 11 May 2018 19:54:02 +0300 Ville Syrjälä wrote: > On Fri, May 11, 2018 at 05:52:56PM +0200, Boris Brezillon wrote: > > On Fri, 11 May 2018 18:34:50 +0300 > > Ville Syrjälä wrote: > > > > > On Fri, May 11, 2018 at 04:59:17PM +0200, Boris Brezillo

Re: [PATCH v2 2/4] drm/vc4: Take underscan setup into account when updating planes

2018-05-11 Thread Boris Brezillon
On Fri, 11 May 2018 20:29:48 +0300 Ville Syrjälä wrote: > On Fri, May 11, 2018 at 07:12:21PM +0200, Boris Brezillon wrote: > > On Fri, 11 May 2018 19:54:02 +0300 > > Ville Syrjälä wrote: > > > > > On Fri, May 11, 2018 at 05:52:56PM +0200, Boris Brezillon wrote:

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

2018-04-10 Thread Boris Brezillon
From: Boris Brezillon Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon --- Hello Rob, I dropped your Acked-by because this version now documents the DPHY bindings. Regards, Boris Changes in v6: - Document the DPHY bindings - Drop Rob's ack becau

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

2018-04-10 Thread Boris Brezillon
From: Boris Brezillon 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 missing. Here is a non-exhaustive list of miss

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 wrote: > Signed-off-by: Eric Anholt > Fixes: 65101d8c9108 ("drm/vc4: Expose performance counters to userspace") Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/vc4/vc4_drv.c | 1 + > 1 file changed, 1 insertion(+)

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 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 Padovan > Signed-off-by: Boris Br

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. if not all RGB pin

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 the RGB pins betw

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

2018-04-18 Thread Boris Brezillon
atmel_hlcdc_crtc_create(struct drm_device *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, > +

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 a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_

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 wrote: > On 2018-04-18 09:29, Boris Brezillon wrote: > > On Tue, 17 Apr 2018 15:10:50 +0200 > > Peter Rosin wrote: > > > >> This beats the heuristic that the connector is involved in what format > >> shou

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 wrote: > On 2018-04-18 09:16, Boris Brezillon wrote: > > Hi Peter, > > > > On Tue, 17 Apr 2018 15:10:48 +0200 > > Peter Rosin wrote: > > > >> With bus-type/bus-width properties in the endpoint nodes, t

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 wrote: > On 2018-04-18 09:36, Boris Brezillon wrote: > > On Tue, 17 Apr 2018 15:10:51 +0200 > > Peter Rosin wrote: > > > >> When the of-graph points to a tda998x-compatible HDMI encoder, register > >>

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

2018-04-20 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 v7 2/2] dt-bindings: drm/bridge: Document Cadence DSI bridge bindings

2018-04-20 Thread Boris Brezillon
From: Boris Brezillon Document the bindings used for the Cadence DSI bridge. Signed-off-by: Boris Brezillon Reviewed-by: Rob Herring --- Changes in v7: - Add Rob's R-b Changes in v6: - Document the DPHY bindings - Drop Rob's ack because of the addition DPHY bindings doc Changes in

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

2018-04-20 Thread Boris Brezillon
From: Boris Brezillon 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 missing. Here is a non-exhaustive list of miss

[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 Reviewed-by: Rob Herring --- Changes in v8: - Update my email address Changes in v7: - Add Rob's R-b Changes in v6: - Document the DPHY bindings - Drop Rob's ack because of the addition DPHY bi

[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 Reviewed-by: Andrzej Hajda Acked-by: Eric Anholt Reviewed-by: Archit Taneja --- Changes in v8: - Update my em

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 the RGB pins betw

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 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 environment which > explains why som

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

2018-04-23 Thread Boris Brezillon
d output mode. For > devices that do not have the "conflicting output formats" issue > (SAMA5D2, SAMA5D4), this is completely irrelevant. > > Signed-off-by: Peter Rosin Acked-by: Boris Brezillon > --- > drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 70 > +

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

2018-04-23 Thread Boris Brezillon
ding 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 Acked-by: Boris Brezillon > --- > .../devicetree/bindings/display/atmel/

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

2018-04-26 Thread Boris Brezillon
| 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 ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 8/8] drm/bridge: cdns: mark PM functions as __maybe_unused

2018-05-28 Thread Boris Brezillon
+Thierry Hi Arnd, On Fri, 25 May 2018 17:50:15 +0200 Arnd Bergmann wrote: > These two functions are unused in some configurations, and using > __maybe_unused > is the easiest way to shut up the harmless warnings: > > drivers/gpu/drm/bridge/cdns-dsi.c:1353:12: error: 'cdns_dsi_suspend' defined

Re: [PATCH] drm/atmel-hlcdc: remove unnecessary if statement

2018-06-17 Thread Boris Brezillon
On Sun, 17 Jun 2018 01:34:34 +0200 Stefan Agner wrote: > Boris, Maxime, > > On 07.08.2017 08:26, Stefan Agner wrote: > > The statement always evaluates to true since the struct fields > > are arrays. This has shown up as a warning when compiling with > > clang: > > warning: address of array 'd

Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane

2018-06-17 Thread Boris Brezillon
On Sun, 17 Jun 2018 10:48:22 +0200 Stefan Agner wrote: > The statement always evaluates to true since the struct fields > are arrays. This has shown up as a warning when compiling with > clang: > warning: address of array 'desc->layout.xstride' will always > evaluate to 'true' [-Wpointer-

Re: [PATCH v2] drm/atmel-hlcdc: check stride values in the first plane

2018-06-17 Thread Boris Brezillon
On Sun, 17 Jun 2018 10:48:22 +0200 Stefan Agner wrote: > The statement always evaluates to true since the struct fields > are arrays. This has shown up as a warning when compiling with > clang: > warning: address of array 'desc->layout.xstride' will always > evaluate to 'true' [-Wpointer-

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 (load_state->me

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 *client

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

2018-11-06 Thread Boris Brezillon
On Tue, 30 Oct 2018 16:12:55 -0700 Eric Anholt wrote: > > + /* Even if the bandwidth/plane required for a single frame is > > +* > > +* vc4_state->src_w[i] * vc4_state->src_h[i] * cpp * vrefresh > > +* > > +* when downscaling, we have to r

[PATCH v3] drm/panel: rpi-touchscreen: Set status to "fail" when detection fails

2018-11-07 Thread Boris Brezillon
The device might be described in the device tree but not connected to the I2C bus. Update the status property so that the DRM panel logic returns -ENODEV when someone tries to get the panel attached to this DT node. Signed-off-by: Boris Brezillon Cc: Rob Herring Cc: Thierry Reding Cc: Daniel

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

2018-11-07 Thread Boris Brezillon
ux locking 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

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 v2 3/3] drm/vc4: Add a load tracker to prevent HVS underflow errors

2018-11-08 Thread Boris Brezillon
On Thu, 08 Nov 2018 08:26:49 -0800 Eric Anholt wrote: > >> > +static void vc4_plane_calc_load(struct drm_plane_state *state) > >> > +{ > >> > +unsigned int hvs_load_shift, vrefresh, i; > >> > +struct drm_framebuffer *fb = state->fb; > >> > +struct vc4_plane_state *vc4_stat

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

2018-11-09 Thread Boris Brezillon
es: fc04023fafec ("drm/vc4: Add support for YUV planes.") Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt --- Changes in v2: - Remove the the ->x_scaling[0] = VC4_SCALING_PPF assignment when ->is_unity is true and update the comment - Add Eric's R-b --- drivers/gpu/drm

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

2018-11-09 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 Reviewed-by: Eric Anholt --- Changes in v2: - Add Eric's R-b --- drivers/gpu/drm/vc4/vc4_plane.c | 8 +

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

2018-11-09 Thread Boris Brezillon
On Fri, 9 Nov 2018 11:26:32 +0100 Boris Brezillon wrote: > For the YUV conversion to work properly, ->x_scaling[1] should never > be set to VC4_SCALING_NONE, but vc4_get_scaling_mode() might return > VC4_SCALING_NONE if the horizontal scaling ratio exactly matches the > horizon

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 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

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

2018-11-13 Thread Boris Brezillon
k() and 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 -

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

2018-11-13 Thread Boris Brezillon
vent 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 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 deleti

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/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

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

2018-11-15 Thread Boris Brezillon
ce during the DDC Bus > > Request/Grant procedure and while talking to the monitor, we > > have to use the adapter locking primitives rather than the > > i2c-mux locking primitives. > > > > Signed-off-by: Fabrizio Castro > > > > --- > > v2->v3: > >

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

2018-11-15 Thread Boris Brezillon
be NULL when called from the async update path because we're passing the current plane state, and plane_state->state has been assigned to NULL in drm_atomic_helper_swap_state(). Pass the new state instead of the current one (the new state has ->state set to a non-NULL value). Signed

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

2018-11-15 Thread Boris Brezillon
vent this auto-completion. Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt --- Changes in v2: - Add Eric's R-b --- 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/gpu/drm/vc4/vc4_kms.c index 127468785f74

[PATCH 1/6] drm/vc4: Make vc4_lbm_size() return 0 when vertical scaling is disabled

2018-11-15 Thread Boris Brezillon
LBM is not needed when vertical scaling is disabled. Return 0 in this case to avoid allocating LBM memory that will anyway be unused. While at it, drop the test on ->is_unity which is now redundant. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 9 ++--- 1 f

[PATCH 4/6] drm/vc4: Rework the async update logic

2018-11-15 Thread Boris Brezillon
ist entry has been properly updated in vc4_plane_mode_set()) Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 87 + 1 file changed, 66 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c

[PATCH 0/6] drm/vc4: Allow scaling on cursor planes

2018-11-15 Thread Boris Brezillon
accepted/merged. Regards, Boris [1]https://patchwork.kernel.org/patch/10394563/ Boris Brezillon (6): drm/vc4: Make vc4_lbm_size() return 0 when vertical scaling is disabled drm/vc4: Move LBM creation out of vc4_plane_mode_set() drm/vc4: Don't check plane state more than once dr

[PATCH 2/6] drm/vc4: Move LBM creation out of vc4_plane_mode_set()

2018-11-15 Thread Boris Brezillon
ation out of vc4_plane_mode_set() and call the new function (vc4_plane_update_lbm()) from vc4_plane_atomic_check(). Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_plane.c | 82 ++--- 2 files changed, 55 insertions(+

[PATCH 5/6] drm/vc4: Allow scaling on cursor plane

2018-11-15 Thread Boris Brezillon
Now that async update has been reworked to allow scaled planes to be updated asynchronously when the scaling params do not change, we can remove the NO_SCALING constraint on cursor planes. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 19 ++- 1 file

[PATCH 6/6] drm/vc4: Allow YUV formats on cursor planes

2018-11-15 Thread Boris Brezillon
Now that scaling is allowed on cursor planes, we can also allow YUV formats. Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c

[PATCH 3/6] drm/vc4: Don't check plane state more than once

2018-11-15 Thread Boris Brezillon
necessary. Add a ->checked field to vc4_plane_state, and use it to track the status of the state (checked or not). Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_drv.h | 5 + drivers/gpu/drm/vc4/vc4_plane.c | 10 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/

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

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 11:23:02 +0100 Boris Brezillon wrote: > vc4_plane_atomic_async_update() calls vc4_plane_atomic_check() > which in turn calls vc4_plane_setup_clipping_and_scaling(), and since > commit 58a6a36fe8e0 ("drm/vc4: Use > drm_atomic_helper_check_plane_state() to s

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

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 11:23:03 +0100 Boris Brezillon wrote: > drm_atomic_helper_setup_commit() auto-completes commit->flip_done when > state->legacy_cursor_update is true, but we now for sure that we want ^know > a sync upda

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

2018-11-15 Thread Boris Brezillon
6a36fe8e0 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic") Signed-off-by: Boris Brezillon --- Changes in v3: - Add a Fixes tag Changes in v2: - Pass the new state instead of plane->state (suggested by Eric) --- drivers/gpu/drm/vc4/vc4_plane.c | 1

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

2018-11-15 Thread Boris Brezillon
vent this auto-completion. Fixes: 184d3cf4f738 ("drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks()") Cc: Signed-off-by: Boris Brezillon Reviewed-by: Eric Anholt --- Changes in v3: - Add missing Fixes and Cc-stable tags - Fix a typo in the commit message Changes in v

Re: [PATCH] drm/fb-helper: Blacklist writeback when adding connectors to fbdev

2018-11-15 Thread Boris Brezillon
iteback connectors in the fbdev helper to solve this. > > Signed-off-by: Paul Kocialkowski Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/drm_fb_helper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_h

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

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 11:39:30 + Fabrizio Castro wrote: > Hello Boris, > > > From: Boris Brezillon > > Sent: 15 November 2018 10:16 > > Subject: Re: [PATCH v3] drm/bridge/sii902x: Fix EDID readback > > > > On Thu, 15 Nov 2018 11:13:52 +0100 > > Linus

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

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 08:25:48 -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

Re: [PATCH 2/6] drm/vc4: Move LBM creation out of vc4_plane_mode_set()

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 12:39:42 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > We are about to use vc4_plane_mode_set() in the async check path, and > > async updates require that LBM size stay the same since they reuse the > > LBM from the previous state. So we

Re: [PATCH 3/6] drm/vc4: Don't check plane state more than once

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 12:41:36 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > We are about to use vc4_plane_mode_set() in the async check path, but > > async check can decide that async update is not possible and force the > > driver to fallback to a sync update

Re: [PATCH 4/6] drm/vc4: Rework the async update logic

2018-11-15 Thread Boris Brezillon
On Thu, 15 Nov 2018 12:49:11 -0800 Eric Anholt wrote: > Boris Brezillon writes: > > > vc4_plane_atomic_async_check() was only based on the > > state->{crtc,src}_{w,h} which was fine since scaling was not allowed on > > the cursor plane. > > > > We are a

Re: [PATCH 3/9] drm: replace "drm_dev_unref" function with "drm_dev_put"

2018-11-15 Thread Boris Brezillon
> drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 4 ++-- For the Atmel HLCDC driver Acked-by: Boris Brezillon > drivers/gpu/drm/etnaviv/etnaviv_drv.c| 4 ++-- > drivers/gpu/drm/mxsfb/mxsfb_drv.c| 4 ++-- > drivers/gpu/drm/rcar-du/rcar_du_drv.c| 2

Re: [PATCH] drm/bridge: Fix 0-day build error

2018-11-19 Thread Boris Brezillon
Hi Fabrizio, The prefix should be "drm/bridge/sii902x:" and I'd prefer a short explanation of what is problematic in the subject rather than "Fix 0-day build error". Maybe something like "drm/bridge/sii902x: Add missing dependency on I2C_MUX" On Mon, 19 Nov 2018 12:44:23 + Fabrizio Castro w

Re: [PATCH] drm/bridge: Fix 0-day build error

2018-11-19 Thread Boris Brezillon
On Mon, 19 Nov 2018 13:09:16 + Fabrizio Castro wrote: > Hi Boris, > > > From: Boris Brezillon > > Sent: 19 November 2018 12:51 > > Subject: Re: [PATCH] drm/bridge: Fix 0-day build error > > > > Hi Fabrizio, > > > > The prefix should

Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on I2C_MUX

2018-11-19 Thread Boris Brezillon
Hi Fabrizio, On Mon, 19 Nov 2018 13:26:18 + Fabrizio Castro wrote: > kbuild test robot reports: > > >> ERROR: "i2c_mux_add_adapter" [drivers/gpu/drm/bridge/sii902x.ko] > undefined! > >> ERROR: "i2c_mux_alloc" [drivers/gpu/drm/bridge/sii902x.ko] > undefined! > >> ERROR: "i2c_mux_del_adap

Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on I2C_MUX

2018-11-19 Thread Boris Brezillon
On Mon, 19 Nov 2018 18:59:04 + Fabrizio Castro wrote: > Hello Boris, > > > From: Boris Brezillon > > Sent: 19 November 2018 16:55 > > Subject: Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on > > I2C_MUX > > > > Hi Fabrizio,

Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on I2C_MUX

2018-11-20 Thread Boris Brezillon
On Mon, 19 Nov 2018 19:09:33 + Fabrizio Castro wrote: > Hello Boris, > > > From: Boris Brezillon > > Sent: 19 November 2018 19:07 > > Subject: Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on > > I2C_MUX > > > > On Mon, 19 Nov 2018

Re: [PATCH v3] drm/bridge/sii902x: Add missing dependency on I2C_MUX

2018-11-20 Thread Boris Brezillon
On Tue, 20 Nov 2018 09:00:47 +0100 Boris Brezillon wrote: > On Mon, 19 Nov 2018 19:09:33 + > Fabrizio Castro wrote: > > > Hello Boris, > > > > > From: Boris Brezillon > > > Sent: 19 November 2018 19:07 > > > Subject: Re: [PATCH v

[PATCH v3 3/3] drm/vc4: Attach underscan props to the HDMI connector

2018-11-22 Thread Boris Brezillon
,right,top,bottom} properties defined in config.txt and parsed by the VC4 firmware. Signed-off-by: Boris Brezillon --- Changes in v3: - none Changes in v2: - none --- drivers/gpu/drm/vc4/vc4_hdmi.c | 25 + 1 file changed, 25 insertions(+) diff --git a/drivers/gpu/drm/vc4

[PATCH v3 2/3] drm/vc4: Take underscan setup into account when updating planes

2018-11-22 Thread Boris Brezillon
ready to attach underscan properties to the HDMI connector. Signed-off-by: Boris Brezillon --- Changes in v3: - Rebase on top of the "cursor rescaling" changes Changes in v2: - Take changes on hborder/vborder meaning into account --- drivers/gpu/drm/vc4/vc4_cr

[PATCH v3 0/3] drm/connector: Provide generic support for underscan

2018-11-22 Thread Boris Brezillon
ion once/if the generic stuff are accepted. Regards, Boris Boris Brezillon (3): drm/connector: Add generic underscan properties drm/vc4: Take underscan setup into account when updating planes drm/vc4: Attach underscan props to the HDMI connector drivers/gpu/drm/drm_atomic_uapi.c |

[PATCH v3 1/3] drm/connector: Add generic underscan properties

2018-11-22 Thread Boris Brezillon
the property parsing logic can be shared by all DRM drivers. A driver can now attach underscan properties to its connector through the drm_connector_attach_underscan_properties() helper, and can check/apply the underscan setup based on the drm_connector_state->underscan fields. Signed-off-by: B

Re: [PATCH v3] drm/rockchip: update cursors asynchronously through atomic.

2018-11-26 Thread Boris Brezillon
On Mon, 26 Nov 2018 12:36:03 -0800 Eric Anholt wrote: > Michael Zoran writes: > > > On Fri, 2018-11-23 at 11:27 +0900, Tomasz Figa wrote: > >> > >> The point here is not about setting and resetting the plane->fb > >> pointer. It's about what happens inside > >> drm_atomic_set_fb_for_plane().

Re: [RESEND PATCH] drm/atmel-hlcdc: Replace drm_dev_unref with drm_dev_put

2018-09-27 Thread Boris Brezillon
On Wed, 26 Sep 2018 13:35:00 +0200 Thomas Zimmermann wrote: > This patch unifies the naming of DRM functions for reference counting > of struct drm_device. The resulting code is more aligned with the rest > of the Linux kernel interfaces. > > Signed-off-by: Thomas Zimmermann Queued to drm-misc

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

2018-10-08 Thread Boris Brezillon
#x27;s 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

[PATCH] drm/vc4: Set ->is_yuv to false when num_planes == 1

2018-10-09 Thread Boris Brezillon
function. Fixes: fc04023fafecf ("drm/vc4: Add support for YUV planes.") Cc: Signed-off-by: Boris Brezillon --- drivers/gpu/drm/vc4/vc4_plane.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index d04b3c3246ba..60d5ad19cedd 10

Re: [PATCH 2/4] drm/v3d: Add a little debugfs entry for measuring the core clock.

2018-10-09 Thread Boris Brezillon
ock, not that the driver was slow. > > Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/v3d/v3d_debugfs.c | 35 +++ > drivers/gpu/drm/v3d/v3d_regs.h| 30 ++ > 2 files changed, 65 insertions(+

Re: [PATCH 3/4] drm/v3d: Add some better documentation of the in_sync arguments.

2018-10-09 Thread Boris Brezillon
On Fri, 28 Sep 2018 16:21:25 -0700 Eric Anholt wrote: > Since this is UAPI, it's good to document what exactly the guarantees > we're providing are. > > Signed-off-by: Eric Anholt Reviewed-by: Boris Brezillon > --- > include/uapi/drm/v3d_drm.h | 10

Re: [PATCH 4/4] drm/v3d: Skip debugfs dumping GCA on platforms without GCA.

2018-10-09 Thread Boris Brezillon
his is Reviewed-by: Boris Brezillon > --- > drivers/gpu/drm/v3d/v3d_debugfs.c | 11 +++ > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/v3d/v3d_debugfs.c > b/drivers/gpu/drm/v3d/v3d_debugfs.c > index d48008adb085..eb2b2d2

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

2018-10-16 Thread Boris Brezillon
f 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 erro

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:

[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-

[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 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

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 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 so f

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

2018-10-24 Thread Boris Brezillon
cope with 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

[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 --

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