[PATCH 07/17] drm/armada: convert primary plane to atomic state

2018-07-11 Thread Russell King
Convert the primary plane as a whole to use its atomic state and the transitional helpers. The CRTC is also switched to use the transitional helpers for mode_set() and mode_set_base(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 308

[PATCH 13/17] drm/armada: move plane works to overlay

2018-07-11 Thread Russell King
Only overlay makes use of these now, so move these to the overlay code. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.h| 2 -- drivers/gpu/drm/armada/armada_overlay.c | 12 drivers/gpu/drm/armada/armada_plane.c | 6 -- 3 files changed, 8 insertions

[PATCH 16/20] drm/armada: update planes after the dumb frame is complete

2018-07-11 Thread Russell King
Write out the plane updates after the dumb frame has completed, but just before the blank period. This allows all the plane updates to be performed in a flicker-free non-tearing manner. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 46

[PATCH 09/20] drm/armada: push responsibility for clock management to backend

2018-07-11 Thread Russell King
Push responsibility for managing the clock during DPMS down into the variant backend, rather than the CRTC layer having knowledge of its state. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_510.c | 19 +++ drivers/gpu/drm/armada/armada_crtc.c | 19

[PATCH 19/20] drm/armada: remove unnecessary armada_plane structure

2018-07-11 Thread Russell King
We no longer require a private armada_plane structure, so eliminate it, and use the drm_plane structure directly. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 6 +++--- drivers/gpu/drm/armada/armada_crtc.h | 7 --- drivers/gpu/drm/armada/armada_plane.c | 17

[PATCH 15/17] drm/armada: move colorkey properties into overlay plane state

2018-07-11 Thread Russell King
Move the overlay plane colorkey properties into the plane state, keeping the existing driver behaviour to avoid breaking userspace. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_overlay.c | 251 +--- 1 file changed, 132 insertions(+), 119 deletions

[PATCH 05/17] drm/armada: merge armada_drm_gra_plane_regs() into only caller

2018-07-11 Thread Russell King
armada_drm_gra_plane_regs() is now only ever called from within armada_drm_primary_update_state(), so merge it into this function. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 55 1 file changed, 24 insertions(+), 31 deletions

[PATCH 12/17] drm/armada: move primary plane to separate file

2018-07-11 Thread Russell King
Split out the primary plane support; this is now entirely separate from the CRTC support. Signed-off-by: Russell King --- drivers/gpu/drm/armada/Makefile | 2 +- drivers/gpu/drm/armada/armada_crtc.c| 273 + drivers/gpu/drm/armada/armada_crtc.h| 10

[PATCH 01/17] drm/armada: clean up armada_drm_crtc_page_flip()

2018-07-11 Thread Russell King
drm_mode_page_flip_ioctl() already takes care of checking the framebuffer format, and also assigns primary->fb after a successful call to this handler. These are both redundant, and can be removed. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 12 1 f

[PATCH 2/3] drm/armada: add OF reserved memory support

2018-07-11 Thread Russell King
Existing Armada DRM makes use of reserved memory for allocating contiguous screen buffers, which currently prevents its use with DT systems. Add support for this for DT systems. Signed-off-by: Russell King --- drivers/gpu/drm/armada/Makefile | 3 +++ drivers/gpu/drm/armada/armada_drv.c

[PATCH 11/20] drm/armada: implement atomic_enable()/atomic_disable() methods

2018-07-11 Thread Russell King
Implement the atomic_enable()/atomic_disable() methods used by the atomic modeset helpers. atomic_disable() will need some transitional code during conversion to ensure proper ordering is maintained. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 71

[PATCH] drm/omap: sharp ls037v7dw01: restore optional GPIOs

2018-12-10 Thread Russell King
x_optional() rather than devm_gpiod_get_index() to conform to its binding documentation. Fixes: ca8c67dafdb7 ("fbdev: omap2: improve usage of gpiod API") Signed-off-by: Russell King --- drivers/gpu/drm/omapdrm/displays/panel-sharp-ls037v7dw01.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[GIT PULL] TDA9950 fixes for 4.19

2018-10-01 Thread Russell King
Hi David, The following changes since commit f0316f93897c4c4e67278b175bfbfd3a95ba650a: drm/i2c: tda9950: add CEC driver (2018-04-24 10:44:25 +0100) are available in the git repository at: git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda9950-fixes for you to fetch changes up to e0dccce1

[GIT PULL] Armada DRM fixes fixes

2018-07-15 Thread Russell King
92298c1cd8e8a6b56322b602ad72b54e6237631d: drm/armada: fix irq handling (2018-07-09 11:32:58 +0100) Russell King (2): drm/armada: fix colorkey mode property drm/armada: fix irq handling drivers/gpu/drm/armada/armada_crtc.c| 12

[PATCH] drm/etnaviv: try harder to dump core

2018-07-18 Thread Russell King
Try a bit harder to produce a devcoredump when things go wrong. If we fail to allocate the memory for a dump including the actual bo contents, omit the bos and try again. Capturing some information from the GPU is better than having no information. Signed-off-by: Russell King --- drivers/gpu

[PATCH v2 4/7] drm/i2c: tda998x: convert to bridge driver

2018-07-31 Thread Russell King
Convert tda998x to a bridge driver with built-in encoder support for compatibility with existing component drivers. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 154 +++--- 1 file changed, 79 insertions(+), 75 deletions(-) diff --git a

[PATCH v2 1/7] drm/i2c: tda998x: find the drm_device via the drm_connector

2018-07-31 Thread Russell King
From: Peter Rosin This prepares for being a drm_bridge which will not register the encoder. That makes the connector the better choice. Reviewed-by: Laurent Pinchart Signed-off-by: Peter Rosin Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 2 +- 1 file changed, 1

[PATCH v2 5/7] drm/i2c: tda998x: allocate tda998x_priv inside tda998x_create()

2018-07-31 Thread Russell King
Move the tda998x_priv allocation inside tda998x_create() and simplify the tda998x_create()'s arguments. Pass the same to tda998x_destroy(). Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 30 -- 1 file changed, 16 insertions(+), 14 dele

[PATCH v2 2/7] drm/i2c: tda998x: split tda998x_encoder_dpms into enable/disable

2018-07-31 Thread Russell King
, preserving original behaviour.] Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 37 + 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index b05f54c8585b

[PATCH v2 3/7] drm/i2c: tda998x: move tda998x_set_config() into tda998x_create()

2018-07-31 Thread Russell King
Move the non-DT configuration of the TDA998x into tda998x_create() so that we do all setup in one place. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 73 +++ 1 file changed, 35 insertions(+), 38 deletions(-) diff --git a/drivers/gpu

[PATCH v2 6/7] drm/i2c: tda998x: cleanup from previous changes

2018-07-31 Thread Russell King
Cleanup the code a little from the effects of the previous changes: - Move tda998x_destroy() to be above tda998x_create() - Use 'dev' directly in tda998x_create() where appropriate. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 76 +++-

[PATCH v2 7/7] drm/i2c: tda998x: register bridge outside of component helper

2018-07-31 Thread Russell King
Register the bridge outside of the component helper as we have drivers that wish to use the tda998x without its encoder. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/gpu

[GIT PULL] Armada DRM atomic modeset conversion

2018-07-31 Thread Russell King
e Cubox with xf86-video-armada including the overlay plane, and also tested with the tools in libdrm. Thanks. -------- Russell King (37): drm/armada: clean up armada_drm_crtc_page_flip() drm/armada: add rectangle helpers dr

[PATCH 2/4] drm/i2c: tda998x: get rid of private fill_modes function

2018-08-02 Thread Russell King
We can achieve the same effect via the get_modes() method, rather than wrapping the fill_modes helper. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 30 ++ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/i2c

[PATCH 3/4] drm/i2c: tda998x: correct PLL divider calculation

2018-08-02 Thread Russell King
The serializer PLL divider is a power-of-two divider, so our calculation which assumes that it's a numerical divider is incorrect. Replace it with one that results in a power-of-two divider value instead. Tested with all supported modes with a Samsung S24C750. Signed-off-by: Russell

[PATCH 4/4] drm/i2c: tda998x: add support for pixel repeated modes

2018-08-02 Thread Russell King
izer pixel repeat count. Since the audio code needs the actual TMDS clock, record that. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/g

[PATCH 1/4] drm/i2c: tda998x: move mode_valid() to bridge

2018-08-02 Thread Russell King
Move the mode_valid() implementation to the bridge instead of the connector, as we're checking the bridge's capabilities. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) di

[GIT PULL] TDA998x I2C driver development updates

2018-08-03 Thread Russell King
r Rosin (2): drm/i2c: tda998x: find the drm_device via the drm_connector drm/i2c: tda998x: split tda998x_encoder_dpms into enable/disable Russell King (8): drm/i2c: tda998x: move tda998x_set_config() into tda998x_create() drm/i2c: tda998x: convert to bridge driver drm/i2

[PATCH RFC 1/4] DRM: Armada: implement lastclose() for fbhelper

2013-12-09 Thread Russell King
Call drm_fb_helper_restore_fbdev_mode() upon last close so that in the event of the X server crashing, we have some kind of mode restored. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_drm.h |1 + drivers/gpu/drm/armada/armada_drv.c |7 ++- drivers/gpu/drm/armada

[PATCH RFC 4/4] DRM: Armada: prime refcounting bug fix

2013-12-09 Thread Russell King
Commit 011c2282c74d changed the way refcounting on imported dma_bufs works, and this hadn't been spotted while forward-porting Armada. Reflect the changes in that commit into the Armada driver. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_gem.c |2 +- 1 files chang

[PATCH RFC 3/4] DRM: Armada: fix printing of phys_addr_t/dma_addr_t

2013-12-09 Thread Russell King
These can be 64-bit quantities, so fix them up appropriately. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_fbdev.c |6 +++--- drivers/gpu/drm/armada/armada_gem.c |5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/armada

[PATCH RFC 2/4] DRM: Armada: destroy framebuffer after helper

2013-12-09 Thread Russell King
Destroy the framebuffer only after the helper, since the helper may still be referencing the framebufer at this point. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_fbdev.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/armada

[GIT PULL] Armada DRM v3.12 fixes

2013-12-10 Thread Russell King
|7 --- 4 files changed, 26 insertions(+), 9 deletions(-) through these changes: Russell King (4): DRM: Armada: implement lastclose() for fbhelper DRM: Armada: destroy framebuffer after helper DRM: Armada: fix printing of phys_addr_t/dma_addr_t DRM: Armada: prime

[PATCH v3 3/7] drm/i2c: tda998x: move CEC device initialisation later

2018-04-09 Thread Russell King
We no longer use the CEC client to access the CEC part itself, so we can move this later in the initialisation sequence. Acked-by: Hans Verkuil Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a

[PATCH v3 2/7] drm/i2c: tda998x: fix error cleanup paths

2018-04-09 Thread Russell King
-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 31 ++- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c b/drivers/gpu/drm/i2c/tda998x_drv.c index 83407159e957..2a99930f1bda 100644 --- a/drivers/gpu/drm/i2c

[PATCH v3 4/7] drm/i2c: tda998x: always disable and clear interrupts at probe

2018-04-09 Thread Russell King
Always disable and clear interrupts at probe time to ensure that the TDA998x is in a sane state. This ensures that the interrupt line, which is also the CEC clock calibration signal, is always deasserted. Acked-by: Hans Verkuil Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c

[PATCH v3 1/7] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early

2018-04-09 Thread Russell King
Move the mutex, waitqueue, timer and detect work initialisation early in the driver's initialisation, rather than being after we've registered the CEC device. Acked-by: Hans Verkuil Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 11 +-- 1 file changed, 5

[PATCH v3 7/7] dt-bindings: tda998x: add the calibration gpio

2018-04-09 Thread Russell King
Add the optional calibration gpio for integrated TDA9950 CEC support. This GPIO corresponds with the interrupt from the TDA998x, as the calibration requires driving the interrupt pin low. Reviewed-by: Rob Herring Signed-off-by: Russell King --- Documentation/devicetree/bindings/display/bridge

[PATCH v3 6/7] drm/i2c: tda998x: add CEC support

2018-04-09 Thread Russell King
The TDA998x is a HDMI transmitter with a TDA9950 CEC engine integrated onto the same die. Add support for the TDA9950 CEC engine to the TDA998x driver. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 195

[PATCH v3 5/7] drm/i2c: tda9950: add CEC driver

2018-04-09 Thread Russell King
the messages, and handle error conditions. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 5 + drivers/gpu/drm/i2c/Makefile | 1 + drivers/gpu/drm/i2c/tda9950.c | 509 ++ include/linux/platform_data/tda9950.h | 16 ++ 4

[PATCH] drm/bridge: dw-hdmi: fix EDID parsing

2017-11-08 Thread Russell King
d the helper. Move the parsing there. This caused problems for Luís Mendes. Cc: Reported-by: Luís Mendes Tested-by: Luís Mendes Signed-off-by: Russell King --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 28 1 file changed, 24 insertions(+), 4 deletions(-) diff --

[PATCH] drm: hdlcd: allow HDLCD to be used without interrupt

2017-07-26 Thread Russell King
Some ARM platforms do not wire the HDLCD interrupt. Allow hdlcd to initialise without an interrupt present. Signed-off-by: Russell King --- Documentation/devicetree/bindings/display/arm,hdlcd.txt | 6 +++--- drivers/gpu/drm/arm/hdlcd_drv.c | 13 - 2 files

[PATCH v2 4/4] drm/bridge: dw-hdmi: remove CEC engine register definitions

2017-07-31 Thread Russell King
We don't need the CEC engine register definitions, so let's remove them. Signed-off-by: Russell King --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.h | 45 --- 1 file changed, 45 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.h b/drive

[PATCH v2 3/4] drm/bridge: dw-hdmi: add cec driver

2017-07-31 Thread Russell King
Add a CEC driver for the dw-hdmi hardware. Reviewed-by: Neil Armstrong Signed-off-by: Russell King --- drivers/gpu/drm/bridge/synopsys/Kconfig | 9 + drivers/gpu/drm/bridge/synopsys/Makefile | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi-cec.c | 326

[PATCH v2 1/4] drm/bridge: dw-hdmi: add cec notifier support

2017-07-31 Thread Russell King
Add CEC notifier support to the HDMI bridge driver, so that the CEC part of the IP can receive its physical address. Signed-off-by: Russell King --- drivers/gpu/drm/bridge/synopsys/Kconfig | 1 + drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 22 +- 2 files changed, 22

[PATCH v2 2/4] drm/bridge: dw-hdmi: add better clock disable control

2017-07-31 Thread Russell King
: Russell King --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 29 ++--- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 82e55ee8e4fa..b08cc0c95590 100644 --- a

[PATCH 1/6] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early

2017-11-29 Thread Russell King
Move the mutex, waitqueue, timer and detect work initialisation early in the driver's initialisation, rather than being after we've registered the CEC device. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH 2/6] drm/i2c: tda998x: move CEC device initialisation later

2017-11-29 Thread Russell King
We no longer use the CEC client to access the CEC part itself, so we can move this later in the initialisation sequence. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c

[PATCH 4/6] drm/i2c: tda998x: always disable and clear interrupts at probe

2017-11-29 Thread Russell King
Always disable and clear interrupts at probe time to ensure that the TDA998x is in a sane state. This ensures that the interrupt line, which is also the CEC clock calibration signal, is always deasserted. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 14 +- 1

[PATCH 3/6] drm/i2c: tda998x: fix error cleanup paths

2017-11-29 Thread Russell King
If tda998x_get_audio_ports() fails, and we requested the interrupt, we fail to free the interrupt before returning failure. Rework the failure cleanup code and exit paths so that we always clean up properly after an error, and always propagate the error code. Signed-off-by: Russell King

[PATCH 6/6] drm/i2c: tda998x: add CEC support

2017-11-29 Thread Russell King
The TDA998x is a HDMI transmitter with a TDA9950 CEC engine integrated onto the same die. Add support for the TDA9950 CEC engine to the TDA998x driver. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 209

[PATCH 5/6] drm/i2c: tda9950: add CEC driver

2017-11-29 Thread Russell King
the messages, and handle error conditions. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 5 + drivers/gpu/drm/i2c/Makefile | 1 + drivers/gpu/drm/i2c/tda9950.c | 507 ++ include/linux/platform_data/tda9950.h | 16 ++ 4

[PATCH 3/5] drm/armada: fix UV swap code

2017-11-29 Thread Russell King
The UV swap code was not always programming things correctly when the source origin box has been offset. Fix this. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.h| 2 ++ drivers/gpu/drm/armada/armada_overlay.c | 38 - 2 files changed

[PATCH 2/5] drm/armada: fix SRAM powerdown

2017-11-29 Thread Russell King
Avoid powering down the overlay SRAM banks when disabling the primary plane, thereby masking any overlay video. This feature is supposed to allow us to cut the bandwidth required while displaying full-frame overlay video. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 9

[PATCH 7/6] dt-bindings: tda998x: add the calibration gpio

2017-11-29 Thread Russell King
Add the optional calibration gpio for integrated TDA9950 CEC support. This GPIO corresponds with the interrupt from the TDA998x, as the calibration requires driving the interrupt pin low. Signed-off-by: Russell King --- Sorry, this patch got forgotten, tacking it on the end of the series

[PATCH 1/5] drm/armada: fix leak of crtc structure

2017-11-29 Thread Russell King
Fix the leak of the CRTC structure in the failure paths of armada_drm_crtc_create(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada

[PATCH 4/5] drm/armada: improve efficiency of armada_drm_plane_calc_addrs()

2017-11-29 Thread Russell King
Lookup the drm_format_info structure once when computing all the framebuffer plane addresses by using drm_format_info(), rather than repetitive lookups via drm_format_plane_cpp(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH 5/5] drm/armada: fix YUV planar format framebuffer offsets

2017-11-29 Thread Russell King
We weren't correctly calculating the YUV planar offsets for subsampled chroma planes correctly - fix up the coordinates for planes 1 and 2. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH v2 2/7] drm/i2c: tda998x: move CEC device initialisation later

2017-12-06 Thread Russell King
We no longer use the CEC client to access the CEC part itself, so we can move this later in the initialisation sequence. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i2c/tda998x_drv.c

[PATCH v2 5/7] drm/i2c: tda9950: add CEC driver

2017-12-06 Thread Russell King
the messages, and handle error conditions. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 5 + drivers/gpu/drm/i2c/Makefile | 1 + drivers/gpu/drm/i2c/tda9950.c | 507 ++ include/linux/platform_data/tda9950.h | 16 ++ 4

[PATCH v2 1/7] drm/i2c: tda998x: move mutex/waitqueue/timer/work init early

2017-12-06 Thread Russell King
Move the mutex, waitqueue, timer and detect work initialisation early in the driver's initialisation, rather than being after we've registered the CEC device. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 11 +-- 1 file changed, 5 insertions(+), 6

[PATCH v2 4/7] drm/i2c: tda998x: always disable and clear interrupts at probe

2017-12-06 Thread Russell King
Always disable and clear interrupts at probe time to ensure that the TDA998x is in a sane state. This ensures that the interrupt line, which is also the CEC clock calibration signal, is always deasserted. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/tda998x_drv.c | 14 +- 1

[PATCH v2 6/7] drm/i2c: tda998x: add CEC support

2017-12-06 Thread Russell King
The TDA998x is a HDMI transmitter with a TDA9950 CEC engine integrated onto the same die. Add support for the TDA9950 CEC engine to the TDA998x driver. Signed-off-by: Russell King --- drivers/gpu/drm/i2c/Kconfig | 1 + drivers/gpu/drm/i2c/tda998x_drv.c | 209

[PATCH v2 3/7] drm/i2c: tda998x: fix error cleanup paths

2017-12-06 Thread Russell King
If tda998x_get_audio_ports() fails, and we requested the interrupt, we fail to free the interrupt before returning failure. Rework the failure cleanup code and exit paths so that we always clean up properly after an error, and always propagate the error code. Signed-off-by: Russell King

[PATCH v2 7/7] dt-bindings: tda998x: add the calibration gpio

2017-12-06 Thread Russell King
Add the optional calibration gpio for integrated TDA9950 CEC support. This GPIO corresponds with the interrupt from the TDA998x, as the calibration requires driving the interrupt pin low. Signed-off-by: Russell King --- Documentation/devicetree/bindings/display/bridge/tda998x.txt | 3 +++ 1

[PATCH 06/25] drm/armada: allow the primary plane to be disabled

2017-12-08 Thread Russell King
Add our own hook to allow the primary plane to be disabled. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 99 1 file changed, 55 insertions(+), 44 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm

[PATCH 5/5] drm/armada: fix YUV planar format framebuffer offsets

2017-12-11 Thread Russell King
We weren't correctly calculating the YUV planar offsets for subsampled chroma planes correctly - fix up the coordinates for planes 1 and 2. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/driver

[PATCH 23/25] drm/armada: implement primary plane update

2017-12-11 Thread Russell King
to seemlessly disable and re-enable the primary plane when (eg) displaying full-frame video without any graphic clipping the overlaid video - which saves wasting memory bandwidth needlessly verifying that the colorkey is indeed filling the entire primary plane. Signed-off-by: Russell King

[PATCH 02/25] drm/armada: add a common frame work allocator

2017-12-11 Thread Russell King
Add and use a common frame work allocator, initialising the frame work to a sane state. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b

[PATCH 1/5] drm/armada: fix leak of crtc structure

2017-12-11 Thread Russell King
Fix the leak of the CRTC structure in the failure paths of armada_drm_crtc_create(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 25 + 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b

[PATCH 01/25] drm/armada: remove armada_drm_plane_work_cancel() return value

2017-12-11 Thread Russell King
armada_drm_plane_work_cancel()'s returned work structure is never used or referenced, so it's pointless returning it. It's also pointless because the caller doesn't have a clue what kind of work structure it is. Signed-off-by: Russell King --- drivers/gpu/drm/arma

[PATCH 15/25] drm/armada: use drm_plane_helper_check_state()

2017-12-11 Thread Russell King
efficient. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_overlay.c | 61 + 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_overlay.c index 19fce1a7159f..010f3e438607

[PATCH 3/5] drm/armada: fix UV swap code

2017-12-11 Thread Russell King
The UV swap code was not always programming things correctly when the source origin box has been offset. Fix this. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.h| 2 ++ drivers/gpu/drm/armada/armada_overlay.c | 38 - 2 files changed

[PATCH 10/25] drm/armada: move fb retirement into armada_plane_work

2017-12-11 Thread Russell King
Both the primary and overlay planes retire framebuffers in a similar manner; this can be consolidated by moving the retirement up to the armada_plane_work layer. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 12 +++- drivers/gpu/drm/armada/armada_crtc.h

[PATCH 12/25] drm/armada: move regs into armada_plane_work

2017-12-11 Thread Russell King
Move the register update structure out of the overlay private structure into armada_plane_work, as this is common to both the primary and overlay planes. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 42 -- drivers/gpu/drm/armada

[PATCH 11/25] drm/armada: move event sending into armada_plane_work

2017-12-11 Thread Russell King
Move the sending of events into the armada_plane_work structure, and combine the processing in armada_drm_plane_work_call(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 27 +-- drivers/gpu/drm/armada/armada_crtc.h | 1 + 2 files changed, 14

[PATCH 14/25] drm/armada: only enable HSMOOTH if scaling horizontally

2017-12-11 Thread Russell King
Only enable the HSMOOTH control bit if we are scaling horizontally, otherwise it makes no sense to enable the horizontal scaler. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 5 +++-- drivers/gpu/drm/armada/armada_overlay.c | 10 +- 2 files changed, 8

[PATCH 04/25] drm/armada: add work cancel callback

2017-12-11 Thread Russell King
Add a work cancel callback, so that work items can add functionality to clean themselves up when they are cancelled. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 23 --- drivers/gpu/drm/armada/armada_crtc.h | 1 + 2 files changed, 17 insertions

[PATCH 22/25] drm/armada: extract register generation from armada_drm_primary_set()

2017-12-11 Thread Russell King
Extract the register generation from armada_drm_primary_set(), so that it can be re-used. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b

[PATCH 08/25] drm/armada: clear plane enable bit when disabling

2017-12-11 Thread Russell King
Clear the plane enable bit in the software state within armada_drm_plane_disable() when disabling either the primary or overlay planes. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 10 ++ drivers/gpu/drm/armada/armada_overlay.c | 2 -- 2 files changed, 6

[PATCH 17/25] drm/armada: avoid work allocation

2017-12-11 Thread Russell King
Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 24 +--- drivers/gpu/drm/armada/armada_crtc.h| 3 +++ drivers/gpu/drm/armada/armada_overlay.c | 11 +++ 3 files changed, 23 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm

[PATCH 03/25] drm/armada: store plane in armada_plane_work

2017-12-11 Thread Russell King
Store the plane in the armada_plane_work structure rather than passing it around; it doesn't get used very much in the work structures, so passing it around is a needless expense. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 27 +++ dr

[PATCH 20/25] drm/armada: move overlay plane register update generation

2017-12-11 Thread Russell King
Move the overlay plane register update generation to a separate function as this is independent of the legacy or atomic update. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.h| 2 + drivers/gpu/drm/armada/armada_overlay.c | 203 +--- 2

[PATCH 18/25] drm/armada: disable planes at next blanking period

2017-12-11 Thread Russell King
ode. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 59 - drivers/gpu/drm/armada/armada_overlay.c | 23 - 2 files changed, 50 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/arm

[PATCH 05/25] drm/armada: wait and cancel any pending frame work at disable

2017-12-11 Thread Russell King
Wait for a second, and if we time out, cancel any pending work when disabling the primary plane. This ensures that any pending work is completed or cleaned up prior to the disable taking effect. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 28

[PATCH 4/5] drm/armada: improve efficiency of armada_drm_plane_calc_addrs()

2017-12-11 Thread Russell King
Lookup the drm_format_info structure once when computing all the framebuffer plane addresses by using drm_format_info(), rather than repetitive lookups via drm_format_plane_cpp(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 5 +++-- 1 file changed, 3 insertions(+), 2

[PATCH 07/25] drm/armada: clean up armada_drm_crtc_plane_disable()

2017-12-11 Thread Russell King
Merge armada_drm_primary_disable() into armada_drm_crtc_plane_disable() and rename to armada_drm_plane_disable(). Use this to simplify armada_ovl_plane_disable(). Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 21 + drivers/gpu/drm/armada

[PATCH 24/25] drm/armada: expand overlay trace entry

2017-12-11 Thread Russell King
Add CRTC and source positions to the Armada overlay trace entry. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_trace.h | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_trace.h b/drivers/gpu/drm/armada

[PATCH 16/25] drm/armada: allow armada_drm_plane_work_queue() to silently fail

2017-12-11 Thread Russell King
Avoid printing an error message when armada_drm_plane_work_queue() is unable to get the vblank (eg, because we're doing a modeset.) Continue to report the failure to the caller, so the caller can handle this. Move the error message into armada_ovl_plane_update(). Signed-off-by: Russell

[PATCH 09/25] drm/armada: move overlay plane work out from under spinlock

2017-12-11 Thread Russell King
code for that. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 2 +- drivers/gpu/drm/armada/armada_overlay.c | 4 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/armada/armada_crtc.c b/drivers/gpu/drm/armada/armada_crtc.c index

[PATCH 25/25] drm/armada: add iturbt_709 plane property to control YUV colorspace

2017-12-11 Thread Russell King
Add the defacto-standard "iturbt_709" property to the overlay plane to control the YUV to RGB colorspace conversion. This is mutually exclusive with the CSC_YUV CRTC property - the last property to be set determines the resulting colorspace conversion. Signed-off-by: Russell King --

[PATCH 19/25] drm/armada: re-organise overlay register update generation

2017-12-11 Thread Russell King
Re-organise overlay register generation so that we do not have to wait for the previous update to complete while creating the new state. This allows the update to be fully prepared before queueing it for the next interrupt. Signed-off-by: Russell King --- drivers/gpu/drm/armada

[PATCH 13/25] drm/armada: move writes of LCD_SPU_SRAM_PARA1 under lock

2017-12-11 Thread Russell King
Move writes of LCD_SPU_SRAM_PARA1 under the irq lock, so that we can add this to the frame updates at interrupt time when disabling a plane. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c| 10 ++ drivers/gpu/drm/armada/armada_overlay.c | 5 +++-- 2 files

[PATCH 2/5] drm/armada: fix SRAM powerdown

2017-12-11 Thread Russell King
Avoid powering down the overlay SRAM banks when disabling the primary plane, thereby masking any overlay video. This feature is supposed to allow us to cut the bandwidth required while displaying full-frame overlay video. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_crtc.c | 9

[PATCH 21/25] drm/armada: wait for previous work when moving overlay window

2017-12-11 Thread Russell King
We must wait for the previous plane work to complete before moving the overlay window, as it could overwrite our positioning update. Signed-off-by: Russell King --- drivers/gpu/drm/armada/armada_overlay.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[GIT PULL] Armada DRM (drm-armada-devel-4.15 branch)

2018-01-03 Thread Russell King
h| 26 +- drivers/gpu/drm/armada/armada_overlay.c | 300 +++--- drivers/gpu/drm/armada/armada_trace.h | 24 +- 4 files changed, 494 insertions(+), 289 deletions(-) through these changes: Russell King (29): drm/armada: fix leak of crtc structure drm/armada: fix SRAM

[GIT PULL] Armada DRM (drm-armada-fixes-4.15 branch)

2018-01-03 Thread Russell King
/armada/armada_crtc.h| 2 ++ drivers/gpu/drm/armada/armada_overlay.c | 38 +- 3 files changed, 48 insertions(+), 39 deletions(-) through these changes: Russell King (5): drm/armada: fix leak of crtc structure drm/armada: fix SRAM powerdown drm/armada

Re: BUG: circular locking dependency detected

2013-01-30 Thread Russell King
On Wed, Jan 30, 2013 at 11:07:16PM +0100, Daniel Vetter wrote: > On Wed, Jan 30, 2013 at 10:52 PM, Russell King wrote: > > Also adding Greg and Daniel to this as Daniel introduced the lockdep > > checking. > > > > This looks extremely horrid to be to solve - the path

Re: BUG: circular locking dependency detected

2013-01-30 Thread Russell King
On Thu, Jan 31, 2013 at 10:52:51AM +1100, Linus Torvalds wrote: > On Thu, Jan 31, 2013 at 9:19 AM, Russell King wrote: > > > > So... what you seem to be telling me is that 3.9 is going to be a > > release which issues lockdep complaints when the console blanks, and > >

Re: BUG: circular locking dependency detected

2013-01-30 Thread Russell King
On Thu, Jan 31, 2013 at 10:04:05AM +1000, Dave Airlie wrote: > On Thu, Jan 31, 2013 at 9:52 AM, Linus Torvalds > wrote: > > On Thu, Jan 31, 2013 at 9:19 AM, Russell King wrote: > >> > >> So... what you seem to be telling me is that 3.9 is going to be a >

<    1   2   3   4   5   6   7   8   9   10   >