Re: [PATCH libdrm v3] tests/modetest: Add atomic support

2018-08-06 Thread Benjamin Gaignard
2018-07-25 16:00 GMT+02:00 Benjamin Gaignard : > If "-a" option is set this make modetest use atomic API instead > of legacy API. > > Test the frame rate ("-v") it does a loop and swap between two > framebuffer for each active planes. > > Signed-off-by: Benjamin Gaignard > --- > > version 3: > -

Re: [PATCH 0/2] Fix connector probing deadlocks from RPM bugs

2018-08-06 Thread Daniel Vetter
On Wed, Jul 18, 2018 at 04:56:38PM -0400, Lyude Paul wrote: > This is a trimmed down version of > > https://patchwork.freedesktop.org/series/46637/ > > with all of the review comments addressed. > > The last version of this series had fixes for the i2c and DP aux busses > to ensure that the GPU

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

2018-08-06 Thread Peter Rosin
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 between the lcd controller and the encoder are not routed on the PCB.

Re: Re: [PATCH] drm/kms/crtc: Saving crtc->primary into a drm_plane pointer instead of dereferencing it every time.

2018-08-06 Thread Satendra Singh Thakur
On Mon, 30 Jul 2018 at 09:33:55 -0400 Sean Paul wrote: >Maybe this is simpler, but not overwhelmingly so. >To be honest, I'm a bit concerned with the volume of no-op patches you're >sending to the list. I so appreciate and encourage your participation, >but perhaps we could redirect your

[PATCH] gpu:p1111: Make sure of_device_id tables are NULL terminated

2018-08-06 Thread zhong jiang
We prefer to of_device_id tables are NULL terminated. So make vexpress_muxfpga_match is NULL terminated. Signed-off-by: zhong jiang --- drivers/gpu/drm/pl111/pl111_vexpress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/pl111/pl111_vexpress.c

Re: [PATCH v3 05/14] gpu: ipu-v3: Allow negative offsets for interlaced scanning

2018-08-06 Thread Steve Longerbeam
Hi Philipp, On 08/02/2018 02:46 AM, Philipp Zabel wrote: On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote: From: Philipp Zabel The IPU also supports interlaced buffers that start with the bottom field. To achieve this, the the base address EBA has to be increased by a stride length

[PATCH] drm/rockchip: Allow driver to be shutdown on reboot/kexec

2018-08-06 Thread Marc Zyngier
Leaving the DRM driver enabled on reboot or kexec has the annoying effect of leaving the display generating transactions whilst the IOMMU has been shut down. In turn, the IOMMU driver (which shares its interrupt line with the VOP) starts warning either on shutdown or when entering the secondary

Re: [PATCH v1] gpu: host1x: Ignore clients initialization failure

2018-08-06 Thread Dmitry Osipenko
On Friday, 3 August 2018 13:50:55 MSK Thierry Reding wrote: > On Wed, Aug 01, 2018 at 06:08:07PM +0300, Dmitry Osipenko wrote: > > From time to time new bugs are popping up, causing some host1x client to > > fail its initialization. Currently a single clients initialization failure > > causes

Re: [RFC] drm: Allow DRM_IOCTL_MODE_MAP_DUMB for render nodes

2018-08-06 Thread Martin Fuzzey
Hi Emil, On 03/08/18 14:35, Emil Velikov wrote: Hi Martin, On 1 August 2018 at 15:24, Martin Fuzzey wrote: Let's start with the not-so obvious question: Why does one open the imx as render node? Of the top of my head: There is nothing in egl/android that should require an authenticated

[PATCH v6 1/3] dt-bindings: display: bridge: lvds-transmitter: add ti, ds90c185

2018-08-06 Thread Peter Rosin
Start list of actual chips compatible with "lvds-encoder". Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/display/bridge/lvds-transmitter.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH v6 2/3] dt-bindings: display: atmel: optional video-interface of endpoints

2018-08-06 Thread Peter Rosin
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 pins are routed on the PCB; the driver has no way of knowing this, and needs

Re: [PATCH V4 0/8] backlight: qcom-wled: Support for QCOM wled driver

2018-08-06 Thread kgunda
Hi Bjorn, Can you please help review this patch series ? Pavel, Rob, Daniel reviewed the series except the "auto string detection" patch. Thanks, Kiran On 2018-07-09 15:52, Kiran Gunda wrote: This patch series renames the pm8941-wled.c driver to qcom-wled.c to add the support for multiple

Re: [PATCH v3 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset

2018-08-06 Thread Philipp Zabel
On Sat, 2018-08-04 at 17:15 +0100, Alexandru Gheorghe wrote: > There are a lot of drivers that subclass drm_plane_state, all of them > duplicate the code that links together the plane with plane_state. > > On top of that, drivers that enable core properties also have to > duplicate the code for

Re: [PATCH v3 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-06 Thread Philipp Zabel
Hi Alexandru, On Sat, 2018-08-04 at 17:15 +0100, Alexandru Gheorghe wrote: > A new helper function(__drm_atomic_helper_plane_reset) has been added > for linking a plane with its state and resetting the core > properties(alpha, rotation, etc.) to their default values. > Use that instead of

[PATCH] drm/radeon, evergreen: ensure equal sizes for depth-stencil npot textures

2018-08-06 Thread Gert Wollny
On evergreen depth-stencil textures are allocated as two objects, and when using the eg_surface_init_1d_miptrees code path the size evaluation uses the generalized surf_minify function. Here when allocating the depth texture the alignment takes the depth bpe value into account, and uses bpe=1 for

Re: [PATCH v2] drm/scheduler: fix timeout worker setup for out of order job completions

2018-08-06 Thread Christian König
Am 03.08.2018 um 19:31 schrieb Lucas Stach: Am Montag, den 06.08.2018, 14:57 +0200 schrieb Christian König: Am 03.08.2018 um 16:29 schrieb Lucas Stach: drm_sched_job_finish() is a work item scheduled for each finished job on a unbound system workqueue. This means the workers can execute out of

Re: [PATCH 2/2] drm/scheduler: stop setting rq to NULL

2018-08-06 Thread Christian König
Am 03.08.2018 um 20:41 schrieb Andrey Grodzovsky: On 08/06/2018 08:44 AM, Christian König wrote: Am 03.08.2018 um 16:54 schrieb Andrey Grodzovsky: [SNIP] > > Second of all, even after we removed the entity from rq in > drm_sched_entity_flush to terminate any subsequent

[PATCH v1] drm/kms/crtc: Improving the func drm_mode_setcrtc

2018-08-06 Thread Satendra Singh Thakur
Following changes are done to this func: 1. The declaration of plane and it's assignment plane = crtc->primary are only used when mode_valid is set. Therefore, moved it inside the if(mode_valid) statement. 2. The declaration of connector and set_connectors_ptr and out_id are moved inside the for

[RESEND PATCH v5 1/3] dt-bindings: display: bridge: lvds-transmitter: add ti, ds90c185

2018-08-06 Thread Peter Rosin
Start list of actual chips compatible with "lvds-encoder". Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/display/bridge/lvds-transmitter.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

[PATCH] gpu: drm: radeon: radeon_test: Replace mdelay() with msleep()

2018-08-06 Thread Jia-Ju Bai
radeon_test_ring_sync() and radeon_test_ring_sync2() are never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai ---

Re: [PATCH 0/2] staging: vboxvideo: Add page-flip support

2018-08-06 Thread Daniel Vetter
On Fri, Jul 20, 2018 at 10:17:29AM -0700, Steve Longerbeam wrote: > Adds crtc page-flip support by passing the new requested framebuffer > to vbox_crtc_do_set_base(). > > There is no attempt to support vblank interrupts, so this page-flip > implementation does not try to sync the page-flip to

Re: [Intel-gfx] [PATCH] drm/i915: Fix typo in i915_drm_resume()

2018-08-06 Thread Mun, Gwan-gyeong
On Fri, 2018-08-03 at 20:12 +0100, Chris Wilson wrote: > Quoting Gwan-gyeong Mun (2018-08-03 17:41:50) > > Even for trivial patches, always include a changelog. In this case, I > added "Trivial typo, s/loose/lose/, in i915_drm_resume." > > > Signed-off-by: Gwan-gyeong Mun > > Reviewed-by:

[PATCH] gpu: drm: radeon: r600: Replace mdelay() and udelay() with msleep() and usleep_range()

2018-08-06 Thread Jia-Ju Bai
r600_gpu_soft_reset() and r600_gpu_pci_config_reset() are never called in atomic context. They call mdelay() and udelay() to busily wait, which is not necessary. mdelay() and udelay() can be replaced with msleep() and usleep_range(). This is found by a static analysis tool named DCNS written by

[PATCH v1] gpu: host1x: Cancel only job that actually got stuck

2018-08-06 Thread Dmitry Osipenko
Host1x doesn't have information about jobs inter-dependency, that is something that will become available once host1x will get a proper jobs scheduler implementation. Currently a hang job causes other unrelated jobs to be canceled, that is a relic from downstream driver which is irrelevant to

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

2018-08-06 Thread Peter Rosin
On 2018-08-03 12:32, Sakari Ailus wrote: > Hi Peter, > > Thanks for cc'ing me. You're welcome, but Laurent is the one to "blame" for hooking you up... :-) > On Fri, Aug 03, 2018 at 12:11:23PM +0200, Peter Rosin wrote: >> With bus-type/bus-width properties in the endpoint nodes, the video- >>

[PATCH 0/2] Compute CRC with cursor plane support

2018-08-06 Thread Haneen Mohammed
This patchset add support for cursor plane and compute CRC for output frame with cursor and primary planes. This currently passes cursor-size-change, onscreen, offscreen, sliding, random, dpms, and rapid-movement igt tests with 64x64 cursor. Haneen Mohammed (2): drm/vkms: Add cursor plane

Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume()

2018-08-06 Thread xinliang
On 2018/8/2 17:57, Souptick Joarder wrote: On Thu, Jul 26, 2018 at 1:37 PM, Souptick Joarder wrote: >On Thu, Jul 19, 2018 at 9:34 PM, Souptick Joarder wrote: >>convert drm_atomic_helper_suspend/resume() to use >>drm_mode_config_helper_suspend/resume(). >> >>Fixed one sparse warning by

[PATCH] drm/radeon, evergreen: ensure equal sizes for depth-stencil npot textures

2018-08-06 Thread Gert Wollny
From: Gert Wollny On evergreen depth-stencil textures are allocated as two objects, and when using the eg_surface_init_1d_miptrees code path the size evaluation uses the generalized surf_minify function. Here when allocating the depth texture the alignment takes the depth bpe value into account,

[PATCH] drm/vmwgfx: Use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] gpu: drm: radeon: si: Replace mdelay() with msleep() in si_pcie_gen3_enable()

2018-08-06 Thread Jia-Ju Bai
si_pcie_gen3_enable() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself Signed-off-by: Jia-Ju Bai --- drivers/gpu/drm/radeon/si.c | 2 +- 1

[PATCH 2/2] drm/vkms: Compute CRC with Cursor Plane

2018-08-06 Thread Haneen Mohammed
This patch compute CRC for output frame with cursor and primary plane. Blend cursor with primary plane and compute CRC on the resulted frame. Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/vkms/vkms_crc.c | 149 +- drivers/gpu/drm/vkms/vkms_drv.h | 5 +-

Re: [PATCH v3] gpu/drm/exynos: Convert drm_atomic_helper_suspend/resume()

2018-08-06 Thread Souptick Joarder
On Fri, Aug 3, 2018 at 12:30 PM, Marek Szyprowski wrote: > Hi, > > On 2018-08-02 17:51, Souptick Joarder wrote: >> On Thu, Aug 2, 2018 at 7:08 PM, Marek Szyprowski >> wrote: >>> On 2018-08-02 15:21, Souptick Joarder wrote: convert drm_atomic_helper_suspend/resume() to use

[PATCH v7 1/3] dt-bindings: display: bridge: lvds-transmitter: add ti, ds90c185

2018-08-06 Thread Peter Rosin
Start list of actual chips compatible with "lvds-encoder". Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/display/bridge/lvds-transmitter.txt | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v2 2/2] drm/vkms: Implement CRC debugfs API

2018-08-06 Thread Haneen Mohammed
On Fri, Aug 03, 2018 at 12:53:36PM -0400, Sean Paul wrote: > On Thu, Aug 02, 2018 at 04:10:26AM +0300, Haneen Mohammed wrote: > > This patch implement the necessary functions to compute and add CRCs > > entries: > > > > - Implement the set_crc_source() callback. > > - Compute CRC using crc32 on

Re: More drm-panel help volunteers?

2018-08-06 Thread Daniel Vetter
On Tue, Jul 17, 2018 at 04:14:11PM +0200, Philipp Zabel wrote: > Hi Daniel, > > On Fri, 2018-07-13 at 10:38 +0200, Daniel Vetter wrote: > > On Fri, Jul 13, 2018 at 10:09 AM, Lucas Stach > > wrote: > > > Hi Daniel, > > > > > > Am Mittwoch, den 11.07.2018, 20:07 +0200 schrieb Daniel Vetter: > >

[PATCH] gpu: drm: nouveau: nvkm: nv50: Replace mdelay() with msleep() in nv50_sensor_setup()

2018-08-06 Thread Jia-Ju Bai
nv50_sensor_setup() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai ---

[PATCH] gpu: drm: nouveau: nvkm: nv40: Replace mdelay() with msleep() in nv40_sensor_setup()

2018-08-06 Thread Jia-Ju Bai
nv40_sensor_setup() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself Signed-off-by: Jia-Ju Bai ---

Re: [PATCH] drm: Remove drm_fbdev_cma_set_suspend()

2018-08-06 Thread Souptick Joarder
On Tue, Jul 31, 2018 at 12:53 AM, Souptick Joarder wrote: > drm_fbdev_cma_set_suspend() is not getting called from > any other places. If there is no plan to use it in future > we can remove this API. > > Signed-off-by: Souptick Joarder > --- Any comment on this patch ? >

Re: [PATCH v3 02/14] gpu: ipu-csi: Check for field type alternate

2018-08-06 Thread Steve Longerbeam
Hi Philipp, On 08/02/2018 02:42 AM, Philipp Zabel wrote: Hi Steve, On Wed, 2018-08-01 at 12:12 -0700, Steve Longerbeam wrote: When the CSI is receiving from a bt.656 bus, include a check for field type 'alternate' when determining whether to set CSI clock mode to CCIR656_INTERLACED or

[PATCH v7 2/3] dt-bindings: display: atmel: optional video-interface of endpoints

2018-08-06 Thread Peter Rosin
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 pins are routed on the PCB; the driver has no way of knowing this, and needs

xrand --output ... --off no longer turns the screen off on Linux >=4.15

2018-08-06 Thread WGH
On Linux 4.14 and earlier, running `xrandr --output ${MONITOR} --off` will result in screen turning off (the monitor will say "no signal" or so). Since 4.15, however, the screen will remain black, but turned on (backlight and everything). I'm running xrandr 1.5.0 and X.Org Server 1.20.0. This

[PATCH] drm/amd/amdkfd/kfd_int_process_v9: Use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] drm/vkms: Release pages_lock before return

2018-08-06 Thread Haneen Mohammed
Release pages_lock before return when vkms_obj->vaddr is NULL. This patch fixes: 6c234fe37c57 ("drm/vkms: Implement CRC debugfs API"). Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/vkms/vkms_crc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

Re: [PATCH] gpu/drm/hisilicon: Convert drm_atomic_helper_suspend/resume()

2018-08-06 Thread Souptick Joarder
On Fri, Aug 3, 2018 at 12:33 PM, xinliang wrote: > > > On 2018/8/2 17:57, Souptick Joarder wrote: >> >> On Thu, Jul 26, 2018 at 1:37 PM, Souptick Joarder >> wrote: >>> >>> >On Thu, Jul 19, 2018 at 9:34 PM, Souptick Joarder >>> > wrote: >>convert drm_atomic_helper_suspend/resume() to use

[PATCH v2 0/2] drm: fix some bridge api misunderstandings

2018-08-06 Thread Peter Rosin
Hi! The first patch was forgotten, so I improved the commit message based on the discussion from last time, and then added a patch with a requested documentation update. See https://lkml.org/lkml/2018/5/2/81 Cheers, Peter Peter Rosin (2): drm/sti: do not remove the drm_bridge that was never

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

2018-08-06 Thread Peter Rosin
On 2018-08-03 10:17, jacopo mondi wrote: > Hi Peter, > > On Fri, Aug 03, 2018 at 09:23:08AM +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

[RESEND PATCH v5 2/3] dt-bindings: display: atmel: optional video-interface of endpoints

2018-08-06 Thread Peter Rosin
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 pins are routed on the PCB; the driver has no way of knowing this, and needs

Re: [RESEND PATCH v5 2/3] dt-bindings: display: atmel: optional video-interface of endpoints

2018-08-06 Thread Peter Rosin
On 2018-08-03 10:11, jacopo mondi wrote: > Hi Peter! > > On Fri, Aug 03, 2018 at 09:23:07AM +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

[PATCH v6 0/3] drm/atmel-hlcdc: bus-width override support

2018-08-06 Thread Peter Rosin
Hi! The background for these patches is that our PCB interface between the SAMA5D3 and the ds90c185 lvds encoder is only using 16 bits, and this has to be described somewhere, or the atmel-hlcdc driver have no chance of selecting the correct output mode. Since we have similar problems with a

Re: [PATCH] drm/tegra: Convert drm_atomic_helper_suspend/resume()

2018-08-06 Thread Souptick Joarder
On Wed, Aug 1, 2018 at 1:37 AM, Souptick Joarder wrote: > convert drm_atomic_helper_suspend/resume() to use > drm_mode_config_helper_suspend/resume(). > > With this conversion, tegra_drm_fb_suspend() and > tegra_drm_fb_resume() wil not be used anymore. > Both of these functions can be removed. >

[PATCH] drm/amdkfd: Use true and false for boolean values

2018-08-06 Thread Gustavo A. R. Silva
Return statements in functions returning bool should use true or false instead of an integer value. This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH 1/2] drm/vkms: Add cursor plane support

2018-08-06 Thread Haneen Mohammed
Add cursor plane support and update vkms_plane_atomic_check to enable positioning cursor plane. Signed-off-by: Haneen Mohammed --- drivers/gpu/drm/vkms/vkms_drv.h| 11 +++--- drivers/gpu/drm/vkms/vkms_output.c | 16 --- drivers/gpu/drm/vkms/vkms_plane.c | 33

[PATCH] drm/bridge: analogix_dp: Downgrade "Link Training" messages to dev_dbg

2018-08-06 Thread Marc Zyngier
The Analogix DP bridge driver is pretty verbose, and outputs things like [ 619.414067] rockchip-dp ff97.edp: Link Training Clock Recovery success [ 619.429233] rockchip-dp ff97.edp: Link Training success! each time the display gets unblanked. While it is good to know that the device is

[PATCH] gpu: drm: radeon: cik: Replace mdelay() with msleep() in cik_pcie_gen3_enable()

2018-08-06 Thread Jia-Ju Bai
cik_pcie_gen3_enable() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai --- drivers/gpu/drm/radeon/cik.c | 2 +- 1

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

2018-08-06 Thread Peter Rosin
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 between the lcd controller and the encoder are not routed on the PCB.

[PATCH v2 2/2] drm: bridge: document bridge attach/detach imbalance

2018-08-06 Thread Peter Rosin
Since 4a878c03d562 ("drm: bridge: Detach bridge from encoder at encoder cleanup time"), it is generally no longer correct to detach bridges from encoders manually. Document that. Signed-off-by: Peter Rosin --- drivers/gpu/drm/drm_bridge.c | 4 1 file changed, 4 insertions(+) diff --git

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

2018-08-06 Thread Peter Rosin
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 between the lcd controller and the encoder are not routed on the PCB.

[PATCH v2 1/2] drm/sti: do not remove the drm_bridge that was never added

2018-08-06 Thread Peter Rosin
Removing the drm_bridge_remove call should avoid a NULL dereference during list processing in drm_bridge_remove if the error path is ever taken. The more natural approach would perhaps be to add a drm_bridge_add, but there are several other bridges that never call drm_bridge_add. Just removing

[PATCH] gpu: drm: radeon: r100: Replace mdelay() with msleep() and usleep_range() in r100_asic_reset()

2018-08-06 Thread Jia-Ju Bai
r100_asic_reset() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep() and usleep_range(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai ---

[RESEND PATCH v5 0/3] drm/atmel-hlcdc: bus-width override support

2018-08-06 Thread Peter Rosin
Hi! This is perhaps not a true resend in that these three patches were originally in a larger series [1], and the series have been rebased to v4.18-rc6. However, I did ask that these three patches should be considered separately. The other patches in the original series have been adopted and

[PATCH v7 0/3] drm/atmel-hlcdc: bus-width override support

2018-08-06 Thread Peter Rosin
Hi! The background for these patches is that our PCB interface between the SAMA5D3 and the ds90c185 lvds encoder is only using 16 bits, and this has to be described somewhere, or the atmel-hlcdc driver have no chance of selecting the correct output mode. Since we have similar problems with a

[PATCH] gpu: drm: radeon: rs600: Replace mdelay() with msleep() and usleep_range() in rs600_asic_reset()

2018-08-06 Thread Jia-Ju Bai
rs600_asic_reset() is never called in atomic context. They call mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep() and usleep_range(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai ---

[PATCH v1] drm/kms/atomic: Improved the func drm_atomic_set_crtc_for_connector

2018-08-06 Thread Satendra Singh Thakur
1. Currently conn_state->crtc is getting assigned a value at two places We can just reduce this assignment to one Signed-off-by: Satendra Singh Thakur --- v1: Hi Mr Maarten, Thanks for the comments. I have modified the patch suitably. Please review. drivers/gpu/drm/drm_atomic.c | 3 +--

[PATCH] gpu: drm: radeon: r300: Replace mdelay() with msleep() and usleep_range() in r300_asic_reset()

2018-08-06 Thread Jia-Ju Bai
r300_asic_reset() is never called in atomic context. It calls mdelay() to busily wait, which is not necessary. mdelay() can be replaced with msleep() and usleep_range(). This is found by a static analysis tool named DCNS written by myself. Signed-off-by: Jia-Ju Bai ---

[PATCH v2 20/21] drm/omap: Pass both output and display omap_dss_device to encoder init

2018-08-06 Thread Laurent Pinchart
The drm_encoder implementation requires access to the omap_dss_device corresponding to the display, which is passed to its initialization function and stored internally. Clean up of the HDMI mode and infoframe handling will require access to the output omap_dss_device. To prepare for that, pass it

Re: [PATCH v4 7/8] drm/nouveau: Fix deadlocks in nouveau_connector_detect()

2018-08-06 Thread Lyude Paul
On Mon, 2018-08-06 at 11:15 +0200, Daniel Vetter wrote: > On Wed, Aug 01, 2018 at 05:14:57PM -0400, Lyude Paul wrote: > > When we disable hotplugging on the GPU, we need to be able to > > synchronize with each connector's hotplug interrupt handler before the > > interrupt is finally disabled. This

Re: [PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume()

2018-08-06 Thread Lukas Wunner
On Mon, Aug 06, 2018 at 03:15:31PM -0400, Lyude Paul wrote: > You did mention in the review of one of my other patches that we should avoid > disabling polling during runtime suspend, and you're definitely right. I feel > a bit silly for not remembering that since I was the one who made it so that

Re: SLAB_TYPESAFE_BY_RCU without constructors (was Re: [PATCH v4 13/17] khwasan: add hooks implementation)

2018-08-06 Thread Jan Kara
On Wed 01-08-18 10:46:35, Dmitry Vyukov wrote: > I guess it would be useful to have such extensive comment for each > SLAB_TYPESAFE_BY_RCU use explaining why it is needed and how all the > tricky aspects are handled. > > For example, the one in jbd2 is interesting because it memsets the > whole

[PATCH v2 11/22] drm/omap: Remove .get_timings() operation from display connectors

2018-08-06 Thread Laurent Pinchart
The analog TV, DVI and HDMI connectors all report timing information through the .get_timings() information. For analog TV outputs the information is queried from the encoder, so the operation is unused. Remove it. For HDMI outputs the display pipeline provides EDID capability, so the operation

[PATCH v2 00/22] omapdrm: Rework the timing-related operations

2018-08-06 Thread Laurent Pinchart
Hello, This patch series reworks all the timing-related operations (.get_timings(), .set_timings() and .check_timings()) as a step toward moving from omap_dss_device to drm_bridge. All timing-related operations are called by the omapdrm driver on the omap_dss_device at the end of display

[PATCH v2 10/22] drm/omap: Query timing information from analog TV encoder

2018-08-06 Thread Laurent Pinchart
Timings for the TV output are currently reported by the analog TV connector. This has the disadvantage of having to handle timing-related operations in a connector omap_dss_device that has, at the hardware level, no knowledge of any timing information. Implement the .get_timings() operation in

[PATCH v2 06/22] drm/omap: Remove unneeded fallback for missing .check_timings()

2018-08-06 Thread Laurent Pinchart
The .check_timings() operation is present in all panels and connectors. The fallback that uses .get_timings() in the absence of .check_timings() is thus unneeded. While it could be argued that the fallback implements a useful check that should be extended to cover all fixed-resolution panels, the

[PATCH v2 09/22] drm/omap: Don't call .check_timings() operation recursively

2018-08-06 Thread Laurent Pinchart
The .check_timings() operation is called recursively from the display device back to the output device. Most components just forward the operation to the previous component in the chain, resulting in lots of duplicated pass-through functions. To avoid that, iterate over the components manually.

[PATCH v2 15/22] drm/omap: Call dispc timings check operation directly

2018-08-06 Thread Laurent Pinchart
Instead of call the dispc timings check function dispc_mgr_timings_ok() from the internal encoders .check_timings() operation, expose it through the dispc ops (after renaming it to check_timings) and call it directly from omapdrm. This allows removal of now empty omap_dss_device .check_timings()

[PATCH v2 08/22] drm/omap: Store bus flags in the omap_dss_device structure

2018-08-06 Thread Laurent Pinchart
Source components in the display pipeline need to configure their output signals polarities and clock driving edge based on the requirements of the sink component. Those requirements are currently shared across the whole pipeline in the flags of a videomode structure, instead of being local to

[PATCH v2 04/22] drm/omap: Make the video_mode pointer to .set_timings() const

2018-08-06 Thread Laurent Pinchart
The .set_timings() operations of the omap_dss_device instances don't need to modify the passed timings. Make the pointer const. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 2 +-

[PATCH v2 05/22] drm/omap: Remove duplicate calls to .set_timings() operation

2018-08-06 Thread Laurent Pinchart
The omap_dss_device .set_timings() operations are called directly from omap_encoder_update(), and indirectly from the omap_dss_device .enable() operation. The latter is called from omap_encoder_enable(), right after calling omap_encoder_update(). The .set_timings() operation it thus called twice

[PATCH v2 07/22] drm/omap: Don't store video mode internally for external encoders

2018-08-06 Thread Laurent Pinchart
The omap_dss_device .set_timings() operation for external encoders stores the video mode in the device data structure. That mode is then never used again. Drop it. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/displays/encoder-opa362.c| 5 -

[PATCH v2 12/22] drm/omap: panels: Don't modify fixed timings

2018-08-06 Thread Laurent Pinchart
Panels drivers store their timings in a device data structure field that is initialized at probe time, either from hardcoded values or from firmware-supplied values. Those timings are then reported through the .get_timings() operation to construct the panel display mode. The panel timings are

[PATCH v2 02/22] drm/omap: Determine connector type directly in omap_connector.c

2018-08-06 Thread Laurent Pinchart
Instead of determining the connector type from the type of the display's omap_dss_device and passing it to the omap_connector_init() function, move the type determination code to omap_connector.c and remove the type argument to the connector init function. This moves code to a more natural

[PATCH v2 16/22] drm/omap: dpi: Don't fixup video mode in dpi_set_mode()

2018-08-06 Thread Laurent Pinchart
The video mode is aleady fixed up by the .check_timings() operation, there's no need to repeat that when enabling the DPI output. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/dpi.c | 12 +--- 1 file changed, 1 insertion(+), 11

[PATCH v2 01/22] drm/omap: Pass both output and display omap_dss_device to connector init

2018-08-06 Thread Laurent Pinchart
The drm_connector implementation requires access to the omap_dss_device corresponding to the display, which is passed to its initialization function and stored internally. Refactoring of the timings operations will require access to the output omap_dss_device. To prepare for that, pass it to the

[PATCH v2 01/21] drm/omap: dss: Remove unused omap_dss_driver operations

2018-08-06 Thread Laurent Pinchart
The .probe(), .remove(), .run_test(), .get_rotate() and .set_rotate() omap_dss_driver operations are not used. Remove them. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/omapdss.h | 7 --- 1 file changed, 7 deletions(-) diff --git

[PATCH v2 00/21] omapdrm: Rework the HPD-related operations

2018-08-06 Thread Laurent Pinchart
Hello, This patch series reworks all the HPD-related operations (detection, EDID read, HPD callback (un)registration and HPD enable/disable) as a step toward moving from omap_dss_device to drm_bridge. All HPD-related operations are called by the omapdrm driver on the omap_dss_device at the end

Re: [PATCH] gpu: drm: radeon: radeon_test: Replace mdelay() with msleep()

2018-08-06 Thread Alex Deucher
On Fri, Aug 3, 2018 at 8:01 PM, Jia-Ju Bai wrote: > radeon_test_ring_sync() and radeon_test_ring_sync2() are never > called in atomic context. > They call mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep(). > > This is found by a static analysis tool named

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

2018-08-06 Thread Eric Anholt
Boris Brezillon writes: > On Mon, 06 Aug 2018 13:02:48 -0700 > Eric Anholt wrote: > >> Boris Brezillon writes: >> >> > From: Eric Anholt >> > >> > Y_OFFSET field starts at bit 8 not 7. >> > >> > Signed-off-by: Eric Anholt >> > Signed-off-by: Boris Brezillon >> >> Your changes in this

Re: [PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume()

2018-08-06 Thread Daniel Vetter
On Mon, Aug 06, 2018 at 09:34:57PM +0200, Lukas Wunner wrote: > On Mon, Aug 06, 2018 at 03:15:31PM -0400, Lyude Paul wrote: > > You did mention in the review of one of my other patches that we should > > avoid > > disabling polling during runtime suspend, and you're definitely right. I > > feel

Re: [PATCH] gpu: drm: radeon: si: Replace mdelay() with msleep() in si_pcie_gen3_enable()

2018-08-06 Thread Alex Deucher
On Fri, Aug 3, 2018 at 8:33 PM, Jia-Ju Bai wrote: > si_pcie_gen3_enable() is never called in atomic context. > It calls mdelay() to busily wait, which is not necessary. > mdelay() can be replaced with msleep(). > > This is found by a static analysis tool named DCNS written by myself > >

[PATCH v2.1 04/21] drm/omap: Check omap_dss_device type based on the output_type field

2018-08-06 Thread Laurent Pinchart
Various functions that need to differentiate between omap_dss_device instances corresponding to displays and to internal encoders use the omap_dss_device.driver field, which is only set for display instances. This gets in the way of the omap_dss_device operations refactoring. Replace that with a

[PATCH v2 03/22] drm/omap: dss: hdmi: Rename hdmi_display_(set|check)_timing() functions

2018-08-06 Thread Laurent Pinchart
The two functions implement the .set_timings() and .check_timings() operations. Rename them to hdmi_disply_set_timings() and hdmi_display_check_timings() respectively to match the operations names and make searching the source code easier. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian

[PATCH v2 19/22] drm/omap: sdi: Fixup video mode in .check_timings() operation

2018-08-06 Thread Laurent Pinchart
The SDI encoder modifies the pixel clock of the requested video mode to take the limitations of the PLL into account in the .enable() operation. This should be performed in the .check_timings() operation instead. Move the fixup. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel ---

[PATCH v2 17/22] drm/omap: dsi: Fixup video mode in .set_config() operation

2018-08-06 Thread Laurent Pinchart
The DSI encoder modifies the passed videomode to take the requirements of the internal DISPC-DSI bus into account in the .enable_video_output() operation. This should be performed in the .check_timings() operation instead. There is however no .check_timings() operation as the DSI encoder uses a

[PATCH v2 21/22] drm/omap: Store CRTC timings in .set_timings() operation

2018-08-06 Thread Laurent Pinchart
The video timings are stored in the CRTC structure by the omap_crtc_dss_set_timings() function, called by dss_mgr_set_timings() from the .enable() operation of the internal encoders. This instead belongs to the .set_timings() code paths. Move the omap_crtc_dss_set_timings() calls accordingly.

[PATCH v2 14/22] drm/omap: Split mode fixup and mode set from encoder enable

2018-08-06 Thread Laurent Pinchart
The encoder enable operation currently performs mode fixup and mode setting for all omap_dss_device instances in the display pipeline. There are dedicated encoder operations for those operations (respectively .atomic_check() and .mode_set()), but they are not used for this purpose. Move the mode

[PATCH v2 22/22] drm/omap: Don't call .set_timings() operation recursively

2018-08-06 Thread Laurent Pinchart
Instead of calling the .set_timings() operation recursively from the display device backwards, iterate over the devices manually in the DRM encoder code. This moves the complexity to a single central location and simplifies the logic in omap_dss_device drivers. Signed-off-by: Laurent Pinchart

[PATCH v2 13/22] drm/omap: Move bus flag hack to encoder implementation

2018-08-06 Thread Laurent Pinchart
The bus flags stored in omap_dss_device instances are used to fixup the video mode before setting it, to honour constraints that can't be expressed through drm_display_mode. The fixup occurs in the CRTC mode set operation and the resulting video mode is stored internally in the CRTC. It is then

[PATCH v2 20/22] drm/omap: venc: Fixup video mode in .check_timings() operation

2018-08-06 Thread Laurent Pinchart
The VENC encoder modifies the requested video mode to match the NTSC or PAL timings (or reject the video mode completely) in the .set_timings() operation. This should be performed in the .check_timings() operation instead. Move the fixup. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian

[PATCH v2 18/22] drm/omap: hdmi: Constify video mode and related pointers

2018-08-06 Thread Laurent Pinchart
Constify many pointers to struct videomode, as well as pointers to container structures, to ensure the video mode isn't modified after the .check_timings() operation. Signed-off-by: Laurent Pinchart Reviewed-by: Sebastian Reichel --- drivers/gpu/drm/omapdrm/dss/hdmi.h | 8

Re: [PATCH v3 3/8] drm/fb_helper: Introduce hotplug_suspend/resume()

2018-08-06 Thread Alex Deucher
On Mon, Aug 6, 2018 at 3:34 PM, Lukas Wunner wrote: > On Mon, Aug 06, 2018 at 03:15:31PM -0400, Lyude Paul wrote: >> You did mention in the review of one of my other patches that we should avoid >> disabling polling during runtime suspend, and you're definitely right. I feel >> a bit silly for

Re: [PATCH v3 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-06 Thread Eric Anholt
Alexandru Gheorghe writes: > A new helper function(__drm_atomic_helper_plane_reset) has been added > for linking a plane with its state and resetting the core > properties(alpha, rotation, etc.) to their default values. > Use that instead of duplicating the logic. > >

  1   2   3   >