[PATCH RFC] media: staging/imx: fix complete handler

2017-09-29 Thread Russell King
capture system unusable with such cameras. Work around this by killing the error entirely, thereby allowing the imx capture to be used with such cameras. Signed-off-by: Russell King --- Not the best solution, but the only one I can think of to fix the regression that happened sometime between a

[PATCH] imx-csi: fix burst size

2017-09-29 Thread Russell King
Setting a burst size of "8" doesn't work for IMX219 with 8-bit bayer, but a burst size of "16" does. Fix this. Signed-off-by: Russell King --- drivers/staging/media/imx/imx-media-csi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/

[PATCH RFC v2 01/35] imx-drm: imx-drm-core: use the crtc drm device for vblank

2014-02-10 Thread Russell King
There are a couple of ways to get at the drm_device for the vblank operations. One of them is via the private imxdrm structure, the other is via the DRM crtc structure, which also stores a pointer. Use the DRM method instead of our own method. Signed-off-by: Russell King --- drivers/staging

[PATCH RFC v2 02/35] imx-drm: imx-drm-core: avoid going the long route round for drm_device

2014-02-10 Thread Russell King
We have the drm_device available, so rather than storing it and then using the stored version, us the one we already have available to us. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a

[PATCH RFC v2 03/35] imx-drm: imx-drm-core: merge imx_drm_crtc_register() into imx_drm_add_crtc()

2014-02-10 Thread Russell King
There's no reason for this to be a separate function; merge the two together. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 33 + 1 file changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core

[PATCH RFC v2 06/35] imx-drm: imx-hdmi: clean up setting CSC registers

2014-02-10 Thread Russell King
Rather than manually writing each register sequentially, we can use a loop to reduce the amount of code. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 40 +- 1 file changed, 14 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH RFC v2 12/35] imx-drm: ipu-v3: more clocking fixes

2014-02-10 Thread Russell King
There's no point in using the clk API for this; we end up having to violate the layering this provides. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 328 ++-- 1 file changed, 105 insertions(+), 223 deletions(-) diff --git a/dr

[PATCH RFC v2 08/35] imx-drm: imx-hdmi: clean up setting of vp_conf

2014-02-10 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 49 +- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index c6e2ba479297..a365233ea084 100644 --- a

[PATCH RFC v2 09/35] imx-drm: imx-hdmi: fix CTS/N setup at init time

2014-02-10 Thread Russell King
instead. Pass this desired pixel clock rate into hdmi_set_clk_regenerator(). Collapse down hdmi_init_clk_regenerator() since it is a copy of hdmi_set_clk_regenerator(), and pass a default pixel clock rate. Signed-off-by: Russell King --- drivers/staging/imx-drm/

[PATCH RFC v2 05/35] imx-drm: imx-hdmi: convert HDMI clock settings to tabular form

2014-02-10 Thread Russell King
Rather than having large if() and switch() statements, provide a table to look up the register settings for various clock rates. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 250 ++--- 1 file changed, 95 insertions(+), 155 deletions

[PATCH RFC v2 04/35] imx-drm: imx-hdmi: fix compile errors

2014-02-10 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 17 ++--- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index f3a1f5e2e492..107e73788030 100644 --- a/drivers/staging/imx-drm

[PATCH RFC v2 11/35] imx-drm: ipu-v3: don't use clk_round_rate() before clk_set_rate()

2014-02-10 Thread Russell King
This is nonsense; clk_round_rate() is just clk_set_rate() without the side effect of changing the hardware. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3

[PATCH RFC v2 10/35] imx-drm: ipu-v3: more inteligent DI clock selection

2014-02-10 Thread Russell King
U internal clock if it can satisfy our requirements, otherwise switch to the DI external clock and try and set the external clock to our desired pixel clock rate. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 54 +++-- 1 file changed, 52

[PATCH RFC v2 07/35] imx-drm: imx-hdmi: provide register modification function

2014-02-10 Thread Russell King
There are a load of read-modify-write patterns to change bitfields in various registers in this driver; provide a helper to perform this manipulation. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 182 + 1 file changed, 65 insertions

[PATCH RFC v2 15/35] imx-drm: imx-drm-core: sanitise imx_drm_encoder_get_mux_id()

2014-02-10 Thread Russell King
callers pass encoder->crtc as the required crtc, so move this inside the function. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 17 ++--- drivers/staging/imx-drm/imx-drm.h | 3 +-- drivers/staging/imx-drm/imx-hdmi.c | 3 +-- drivers/stag

[PATCH RFC v2 16/35] imx-drm: imx-drm-core: use array instead of list for CRTCs

2014-02-10 Thread Russell King
The DRM core indexes vblank by number, so there's little point maintaining a list, and have to scan the list to find the appropriate structure. Instead, use an array of pointers to the CRTCs. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c

[PATCH RFC v2 18/35] imx-drm: simplify setup of panel format

2014-02-10 Thread Russell King
supplied fields there to configure the CRTC. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 18 -- drivers/staging/imx-drm/imx-drm.h | 4 ++-- drivers/staging/imx-drm/imx-hdmi.c | 3 +-- drivers/staging/imx-drm/imx-ldb.c | 3

[PATCH RFC v2 17/35] imx-drm: provide common connector mode validation function

2014-02-10 Thread Russell King
Provide a common connector mode validation function, which can be used to limit the available modes according to other components in the system. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 7 +++ drivers/staging/imx-drm/imx-drm.h | 3 +++ drivers

[PATCH RFC v2 20/35] imx-drm: imx-hdmi: convert to a component device

2014-02-10 Thread Russell King
Convert imx-hdmi to be a component device; it will bind and unbind at the appropriate moment in the main DRM driver's functions. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 41 +++--- 1 file changed, 29 insertions(+), 12 dele

[PATCH RFC v2 21/35] imx-drm: delay publishing sysfs connector entries

2014-02-10 Thread Russell King
ff-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 82b0337096b0..3cd330e646f7 100644 --- a/drivers/staging/im

[PATCH RFC v2 25/35] imx-drm: imx-drm-core: provide helper function to parse possible crtcs

2014-02-10 Thread Russell King
Provide a helper function to parse possible crtcs before the encoder is registered. The crtc mask is derived from the position of the CRTCs registered in the drm_device. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 66 ++ drivers

[PATCH RFC v2 27/35] imx-drm: parallel-display,imx-tve,imx-ldb: initialise drm components directly

2014-02-10 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-ldb.c | 68 ++ drivers/staging/imx-drm/imx-tve.c | 58 +++-- drivers/staging/imx-drm/parallel-display.c | 61 --- 3 files changed, 54 insertions(+),

[PATCH RFC v2 26/35] imx-drm: imx-drm-core: provide common connector and encoder cleanup functions

2014-02-10 Thread Russell King
Provide two helper functions to assist with cleaning up imx-drm connectors and encoders. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 13 + drivers/staging/imx-drm/imx-drm.h | 3 +++ 2 files changed, 16 insertions(+) diff --git a/drivers/staging

[PATCH RFC v2 24/35] imx-drm: use supplied drm_device where possible

2014-02-10 Thread Russell King
data being accessible. Remove the module owner field as well; this provides no protection against the device being unbound. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 34 +- drivers/staging/imx-drm/imx-drm.h | 4 ++-- drivers

[PATCH RFC v2 19/35] imx-drm: convert to componentised device support

2014-02-10 Thread Russell King
Use the componentised device support for imx-drm. This requires all the sub-components and the master device to register with the component device support. Signed-off-by: Russell King --- arch/arm/boot/dts/imx51-babbage.dts| 10 ++- arch/arm/boot/dts/imx53-m53evk.dts | 8

[PATCH RFC v2 22/35] imx-drm: remove separate imx-fbdev

2014-02-10 Thread Russell King
imx_drm_device_get() and imx_drm_device_put() methods; nothing but the fbdev helper was making use of these. Signed-off-by: Russell King --- drivers/staging/imx-drm/Makefile | 1 - drivers/staging/imx-drm/imx-drm-core.c | 43 ++-- drivers/staging/imx-drm/imx-drm.h | 3 -- drivers

[PATCH RFC v2 23/35] imx-drm: remove imx-fb.c

2014-02-10 Thread Russell King
imx-fb.c doesn't need to be separate from imx-drm-core.c - all it is doing is setting up the minimum and maximum sizes of the scanout buffers, and setting up the mode_config function pointers. Move the contents into imx-drm-core.c and kill this file. Signed-off-by: Russell King --- dr

[PATCH RFC v2 28/35] imx-drm: imx-hdmi: initialise drm components directly

2014-02-10 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 56 ++ 1 file changed, 15 insertions(+), 41 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index 7086ea66490f..c5e57ac07243 100644 --- a

[PATCH RFC v2 34/35] imx-drm: imx-drm-core: add core hotplug connector support

2014-02-10 Thread Russell King
Add core imx-drm support for hotplug connector support. We need to setup the poll helper after we've setup the connectors; the helper scans the connectors to determine their capabilities. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 21 + 1

[PATCH RFC v2 29/35] imx-drm: imx-drm-core: remove imx_drm_connector and imx_drm_encoder code

2014-02-10 Thread Russell King
The core imx_drm_connector and imx_drm_encoder code is no longer required - the connectors and encoders are all using the component support, so we can remove this. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 371 + drivers/staging/imx

[PATCH RFC v2 33/35] imx-drm: imx-drm-core: various cleanups

2014-02-10 Thread Russell King
Various cleanups are possible after the previous round of changes; these have no real functional bearing other than tidying up the code. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 47 -- drivers/staging/imx-drm/imx-drm.h | 5

[PATCH RFC v2 31/35] imx-drm: imx-drm-core: kill off mutex

2014-02-10 Thread Russell King
This mutex doesn't protect anything anymore; get rid of it. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 26 +++--- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/im

[PATCH RFC v2 32/35] imx-drm: imx-drm-core: move allocation of imxdrm device to driver load function

2014-02-10 Thread Russell King
It is now no longer necessary to keep this structure around; we can allocate it upon DRM driver load and destroy it thereafter without affecting the other components now. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 47 +- 1 file

[PATCH RFC v2 35/35] imx-drm: imx-hdmi: add hotplug support to HDMI component

2014-02-10 Thread Russell King
. Also, we must not call drm_helper_hpd_irq_event() until we have fully setup the connector; keep the interrupt(s) muted until after that point. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 40 +++--- 1 file changed, 33 insertions(+), 7

[PATCH RFC v2 30/35] imx-drm: imx-drm-core: get rid of drm_mode_group_init_legacy_group()

2014-02-10 Thread Russell King
Since we're now operating like a conventional DRM driver, doing all the initialisation within the driver's ->load callback, we don't need to mess around with the mode groups - we can rely on the one in the DRM platform code. Signed-off-by: Russell King --- drivers/staging/imx-

[GIT PULL] imx-drm conversion to component support

2014-02-24 Thread Russell King
| 56 +- drivers/staging/imx-drm/parallel-display.c | 100 ++-- 20 files changed, 918 insertions(+), 1497 deletions(-) delete mode 100644 drivers/staging/imx-drm/imx-fb.c delete mode 100644 drivers/staging/imx-drm/imx-fbdev.c through these changes: Russell King (29): imx-drm: imx

[GIT PULL] imx-drm staging changes

2014-03-07 Thread Russell King
bus property ARM: dts: imx51: Add IPU ports and endpoints, move imx-drm node to dtsi ARM: dts: imx53: Add IPU DI ports and endpoints, move imx-drm node to dtsi ARM: dts: imx6qdl: Add IPU DI ports and endpoints, move imx-drm node to dtsi staging: imx-drm: Update TODO Russel

[PATCH 1/8] imx-drm: Move IPU_PIX_FMT_GBR24 definition into imx-ipu-v3.h

2014-04-09 Thread Russell King
, place the IPU_PIX_FMT_GBR24 definition in imx-ipu-v3.h, so that both the IPU display interface driver and the TVE encoder driver can access it. Signed-off-by: Philipp Zabel Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm.h | 4 drivers/staging/imx-drm/imx-tve.c

[PATCH 2/8] imx-drm: ipu-dc: Use usleep_range instead of msleep

2014-04-09 Thread Russell King
From: Philipp Zabel To: linux-arm-ker...@lists.infradead.org Since msleep(2) can sleep up to 20ms anyway, make this explicit by using usleep_range(2000, 2). Signed-off-by: Philipp Zabel Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 2 +- 1 file changed, 1

[PATCH 3/8] imx-drm: ipu-dmfc: Remove unneeded 'dmfc' check

2014-04-09 Thread Russell King
ere is no need to do such check. Reported-by: Dan Carpenter Signed-off-by: Fabio Estevam Signed-off-by: Fabio Estevam Acked-by: Philipp Zabel Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-dmfc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/imx-drm/

[PATCH 4/8] imx-drm: imx-ldb: Use snprintf()

2014-04-09 Thread Russell King
based on theory as well. Reported-by: Dan Carpenter Signed-off-by: Fabio Estevam Acked-by: Philipp Zabel Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-ldb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging

[PATCH 8/8] imx-drm: Add RGB666 support for parallel display.

2014-04-09 Thread Russell King
From: Denis Carikli To: linux-arm-ker...@lists.infradead.org Signed-off-by: Denis Carikli Acked-by: Philipp Zabel Signed-off-by: Russell King --- .../devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt | 3 ++- drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 9

[PATCH 6/8] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description.

2014-04-09 Thread Russell King
From: Denis Carikli To: linux-arm-ker...@lists.infradead.org According to the datasheet, setting the di0_polarity_disp_clk field in the GENERAL di register sets the output clock polarity to active high. Signed-off-by: Denis Carikli Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu

[PATCH 5/8] imx-drm: imx-ldb: Add drm_panel support

2014-04-09 Thread Russell King
mp;panel>; ... }; }; panel: panel { compatible = "edt,etm0700g0dh6", "simple-panel"; }; Signed-off-by: Philipp Zabel [Fixed build error due to missing select on DRM_PANEL --rmk] Signed-o

[PATCH] imx-drm: fix hdmi hotplug detection initial state

2014-04-18 Thread Russell King
ethod. Signed-off-by: Russell King --- Having discussed the issue of how to detect HDMI with David Airlie last night, it is perfectly fine to use the HPD signal. The reason adapters like Intel i915 use EDID is because of cross-talk on their HPD signals, which cause them to falsely indicate transi

[PATCH RFC 5/8] imx-drm: update to use component match support

2014-04-26 Thread Russell King
Update the imx-drm driver to use the component match support rather than add_components. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 57 +++--- 1 file changed, 4 insertions(+), 53 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm

[GIT PULL] imx-drm urgent fixes

2014-04-27 Thread Russell King
Greg, Please incorporate the latest imx-drm urgent fixes, which can be found at: git://ftp.arm.linux.org.uk/~rmk/linux-arm.git imx-drm-fixes-urgent with SHA1 a3fe964135d0e4b925eaf4a5891c84daa7885c86. These are the urgent fixes which should be required. arm-soc people have acked the change to

[GIT PULL] imx-drm non-urgent fixes

2014-04-27 Thread Russell King
Greg, Please incorporate the latest imx-drm non-urgent fixes, which can be found at: git://ftp.arm.linux.org.uk/~rmk/linux-arm.git imx-drm-fixes with SHA1 1e6d486be4ea3f17c99c933703f53a6d566292a9. These are the less urgent fixes, but nevertheless, I think they should be submitted for an -rc k

[PATCH 2/4] imx-drm: imx-drm-core: fix DRM cleanup paths

2013-12-16 Thread Russell King
We must call drm_vblank_cleanup() on the error cleanup and unload paths after we've had a successful call to drm_vblank_init(). Ensure that the calls are in the reverse order to the initialisation order. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |

[PATCH 1/4] imx-drm: imx-drm-core: fix error cleanup path for imx_drm_add_crtc()

2013-12-16 Thread Russell King
imx_drm_add_crtc() was kfree'ing the imx_drm_crtc structure while leaving it on the list of CRTCs. Delete it from the list first. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/stagin

[PATCH 4/4] imx-drm: ipu-v3: fix potential CRTC device registration race

2013-12-16 Thread Russell King
Clean up the IPUv3 CRTC device registration; we don't need a separate function just to call platform_device_register_data(), and we don't need the return value converted at all. Update the IPU client id under a mutex, so that parallel probing doesn't race. Signed-off-b

[PATCH 3/4] imx-drm: fix missing symbol exports

2013-12-16 Thread Russell King
Trying to build a modular imx-drm results in a number of missing symbol exports, caused by the recent changes to this driver. Add the necessary exports, and the missing MODULE_LICENSE() tag. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipuv3-plane.c | 10 ++ 1 files

[PATCH 5/8] imx-drm: imx-tve: don't call sleeping functions beneath enable_lock spinlock

2013-12-16 Thread Russell King
() warning should that debugging be enabled. So, let's just get rid of the enable_lock. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-tve.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-dr

[PATCH 7/8] imx-drm: imx-drm-core: make imx_drm_crtc_register() safer

2013-12-16 Thread Russell King
igned-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index b52b8273d652..19e431dee493 100644 --- a/drivers/staging/imx-dr

[PATCH 6/8] imx-drm: imx-drm-core: use defined constant for number of CRTCs.

2013-12-16 Thread Russell King
We have this definition, there's no reason not to use it. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c

[PATCH 8/8] imx-drm: imx-drm-core: improve safety of imx_drm_add_crtc()

2013-12-16 Thread Russell King
We must not add more CRTCs than we have declared to the vblank helpers, otherwise we overflow their arrays. Force failure if we exceed the number of CRTCs. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |9 + 1 files changed, 9 insertions(+), 0 deletions

[PATCH 3/3] imx-drm: imx-drm-core: merge imx_drm_crtc_register() into imx_drm_add_crtc()

2013-12-17 Thread Russell King
There's no reason for this to be a separate function; merge the two together. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 33 --- 1 files changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core

[PATCH 1/3] imx-drm: imx-drm-core: use the crtc drm device for vblank

2013-12-17 Thread Russell King
There are a couple of ways to get at the drm_device for the vblank operations. One of them is via the private imxdrm structure, the other is via the DRM crtc structure, which also stores a pointer. Use the DRM method instead of our own method. Signed-off-by: Russell King --- drivers/staging

[PATCH 2/3] imx-drm: imx-drm-core: avoid going the long route round for drm_device

2013-12-17 Thread Russell King
We have the drm_device available, so rather than storing it and then using the stored version, us the one we already have available to us. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH RFC 01/46] imx-drm: imx-drm-core: use the crtc drm device for vblank

2014-01-02 Thread Russell King
There are a couple of ways to get at the drm_device for the vblank operations. One of them is via the private imxdrm structure, the other is via the DRM crtc structure, which also stores a pointer. Use the DRM method instead of our own method. Signed-off-by: Russell King --- drivers/staging

[PATCH RFC 32/46] imx-drm: use supplied drm_device where possible

2014-01-02 Thread Russell King
data being accessible. Remove the module owner field as well; this provides no protection against the device being unbound. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 34 --- drivers/staging/imx-drm/imx-drm.h |4 +- drivers

[PATCH RFC 09/46] imx-drm: update and fix imx6 DT descriptions for v3 HDMI driver

2014-01-02 Thread Russell King
Signed-off-by: Russell King --- arch/arm/boot/dts/imx6dl.dtsi |3 ++- arch/arm/boot/dts/imx6q.dtsi |1 + arch/arm/boot/dts/imx6qdl.dtsi |1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi index

[PATCH RFC 10/46] imx-drm: imx-hdmi: fix PLL lock wait

2014-01-02 Thread Russell King
timed out: we don't want to wait and then fail without first checking whether we locked. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drive

[PATCH RFC 08/46] imx-drm: add imx6 DT configuration for HDMI

2014-01-02 Thread Russell King
Extracted from another patch by Fabio Estevam, this adds the DT configuration for HDMI output on the IMX6 SoCs Signed-off-by: Russell King --- arch/arm/boot/dts/imx6dl.dtsi |4 arch/arm/boot/dts/imx6q.dtsi |4 arch/arm/boot/dts/imx6qdl.dtsi | 10 ++ 3 files

[PATCH RFC 34/46] imx-drm: imx-drm-core: provide common connector and encoder cleanup functions

2014-01-02 Thread Russell King
Provide two helper functions to assist with cleaning up imx-drm connectors and encoders. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 13 + drivers/staging/imx-drm/imx-drm.h |2 ++ 2 files changed, 15 insertions(+), 0 deletions(-) diff --git a

[PATCH RFC 31/46] imx-drm: remove imx-fb.c

2014-01-02 Thread Russell King
imx-fb.c doesn't need to be separate from imx-drm-core.c - all it is doing is setting up the minimum and maximum sizes of the scanout buffers, and setting up the mode_config function pointers. Move the contents into imx-drm-core.c and kill this file. Signed-off-by: Russell King --- dr

[PATCH RFC 05/46] imx-drm: ipu-v3: don't use clk_round_rate() before clk_set_rate()

2014-01-02 Thread Russell King
This is nonsense; clk_round_rate() is just clk_set_rate() without the side effect of changing the hardware. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3

[PATCH RFC 02/46] imx-drm: imx-drm-core: avoid going the long route round for drm_device

2014-01-02 Thread Russell King
We have the drm_device available, so rather than storing it and then using the stored version, us the one we already have available to us. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 16 1 files changed, 8 insertions(+), 8 deletions(-) diff --git

[PATCH RFC 30/46] imx-drm: remove separate imx-fbdev

2014-01-02 Thread Russell King
imx_drm_device_get() and imx_drm_device_put() methods; nothing but the fbdev helper was making use of these. Signed-off-by: Russell King --- drivers/staging/imx-drm/Makefile |1 - drivers/staging/imx-drm/imx-drm-core.c | 43 +- drivers/staging/imx-drm/imx-drm.h |3 - drivers

[PATCH RFC 03/46] imx-drm: imx-drm-core: merge imx_drm_crtc_register() into imx_drm_add_crtc()

2014-01-02 Thread Russell King
There's no reason for this to be a separate function; merge the two together. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 33 --- 1 files changed, 9 insertions(+), 24 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core

[PATCH RFC 04/46] imx-drm: ipu-v3: more inteligent DI clock selection

2014-01-02 Thread Russell King
U internal clock if it can satisfy our requirements, otherwise switch to the DI external clock and try and set the external clock to our desired pixel clock rate. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 54 +- 1 files changed, 52

[PATCH RFC 06/46] imx-drm: ipu-v3: more clocking fixes

2014-01-02 Thread Russell King
There's no point in using the clk API for this; we end up having to violate the layering this provides. Signed-off-by: Russell King --- drivers/staging/imx-drm/ipu-v3/ipu-di.c | 328 ++- 1 files changed, 105 insertions(+), 223 deletions(-) diff --git a/dr

[PATCH RFC 35/46] imx-drm: parallel-display,imx-tve,imx-ldb: initialise drm components directly

2014-01-02 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-ldb.c | 68 +--- drivers/staging/imx-drm/imx-tve.c | 58 ++- drivers/staging/imx-drm/parallel-display.c | 61 +++-- 3 files changed, 54 insertions(+),

[PATCH RFC 12/46] imx-drm: imx-hdmi: fix wrong comment

2014-01-02 Thread Russell King
The vsync active edge delay is in lines, not pixel clocks. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index fe3a6779b620

[PATCH RFC 40/46] imx-drm: imx-drm-core: move allocation of imxdrm device to driver load function

2014-01-02 Thread Russell King
It is now no longer necessary to keep this structure around; we can allocate it upon DRM driver load and destroy it thereafter without affecting the other components now. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 47 --- 1 files

[PATCH RFC 33/46] imx-drm: imx-drm-core: provide helper function to parse possible crtcs

2014-01-02 Thread Russell King
Provide a helper function to parse possible crtcs before the encoder is registered. The crtc mask is derived from the position of the CRTCs registered in the drm_device. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 66 drivers

[PATCH RFC 11/46] imx-drm: imx-hdmi: fix pixel clock

2014-01-02 Thread Russell King
The correct pixel clock can be found in the drm_display_mode structure. Use this rather than trying to calculate it from the h/v total and the refresh rate, which can be inaccurate. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c |3 +-- 1 files changed, 1 insertions

[PATCH RFC 20/46] imx-drm: imx-hdmi: fix CTS/N setup at init time

2014-01-02 Thread Russell King
instead. Pass this desired pixel clock rate into hdmi_set_clk_regenerator(). Collapse down hdmi_init_clk_regenerator() since it is a copy of hdmi_set_clk_regenerator(), and pass a default pixel clock rate. Signed-off-by: Russell King --- drivers/staging/imx-drm/im

[PATCH RFC 16/46] imx-drm: imx-hdmi: convert HDMI clock settings to tabular form

2014-01-02 Thread Russell King
Rather than having large if() and switch() statements, provide a table to look up the register settings for various clock rates. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 250 ++-- 1 files changed, 95 insertions(+), 155 deletions

[PATCH RFC 36/46] imx-drm: imx-hdmi: initialise drm components directly

2014-01-02 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 56 +-- 1 files changed, 15 insertions(+), 41 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index d81940a8904f..512b39710530 100644 --- a

[PATCH RFC 37/46] imx-drm: imx-drm-core: remove imx_drm_connector and imx_drm_encoder code

2014-01-02 Thread Russell King
The core imx_drm_connector and imx_drm_encoder code is no longer required - the connectors and encoders are all using the component support, so we can remove this. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 370 drivers/staging/imx

[PATCH RFC 13/46] imx-drm: imx-hdmi: get rid of pointless fb_reg

2014-01-02 Thread Russell King
fb_reg provides no real benefit to the driver: imx_hdmi_fb_registered() will never be called multiple times. Let's get rid of this. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/drivers/st

[PATCH RFC 15/46] imx-drm: imx-hdmi: minor cleanups

2014-01-02 Thread Russell King
Some minor cleanups to the HDMI driver. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c |5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index 1eb12c57aa3e..ee0fceb7b5b2

[PATCH RFC 39/46] imx-drm: imx-drm-core: kill off mutex

2014-01-02 Thread Russell King
This mutex doesn't protect anything anymore; get rid of it. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 26 +++--- 1 files changed, 3 insertions(+), 23 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/im

[PATCH RFC 41/46] imx-drm: imx-drm-core: various cleanups

2014-01-02 Thread Russell King
Various cleanups are possible after the previous round of changes; these have no real functional bearing other than tidying up the code. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 47 +++ drivers/staging/imx-drm/imx-drm.h |5

[PATCH RFC 19/46] imx-drm: imx-hdmi: clean up setting of vp_conf

2014-01-02 Thread Russell King
Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 49 --- 1 files changed, 22 insertions(+), 27 deletions(-) diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index f8c652e58a6d..075dd1f0c8a7 100644 --- a

[PATCH RFC 43/46] imx-drm: imx-hdmi: add hotplug support to HDMI component

2014-01-02 Thread Russell King
. Also, we must not call drm_helper_hpd_irq_event() until we have fully setup the connector; keep the interrupt(s) muted until after that point. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 40 +-- 1 files changed, 33 insertions(+), 7

[PATCH RFC 29/46] imx-drm: delay publishing sysfs connector entries

2014-01-02 Thread Russell King
ff-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 22 +- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 8ece15944569..d5bf4a4646a3 100644 --- a/drivers/stagin

[PATCH RFC 42/46] imx-drm: imx-drm-core: add core hotplug connector support

2014-01-02 Thread Russell King
Add core imx-drm support for hotplug connector support. We need to setup the poll helper after we've setup the connectors; the helper scans the connectors to determine their capabilities. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 20 --

[PATCH RFC 17/46] imx-drm: imx-hdmi: clean up setting CSC registers

2014-01-02 Thread Russell King
Rather than manually writing each register sequentially, we can use a loop to reduce the amount of code. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 40 --- 1 files changed, 14 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH RFC 21/46] drm: provide a helper for the encoder possible_crtcs mask

2014-01-02 Thread Russell King
already exists for calculating the appropriate mask bit for a CRTC. Signed-off-by: Russell King --- drivers/gpu/drm/drm_crtc_helper.c | 39 include/drm/drm_crtc_helper.h |1 + 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/drivers

[PATCH RFC 23/46] imx-drm: imx-drm-core: use array instead of list for CRTCs

2014-01-02 Thread Russell King
The DRM core indexes vblank by number, so there's little point maintaining a list, and have to scan the list to find the appropriate structure. Instead, use an array of pointers to the CRTCs. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |

[PATCH RFC 18/46] imx-drm: imx-hdmi: provide register modification function

2014-01-02 Thread Russell King
There are a load of read-modify-write patterns to change bitfields in various registers in this driver; provide a helper to perform this manipulation. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 188 +--- 1 files changed, 68 insertions

[PATCH RFC 22/46] imx-drm: imx-drm-core: sanitise imx_drm_encoder_get_mux_id()

2014-01-02 Thread Russell King
callers pass encoder->crtc as the required crtc, so move this inside the function. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 17 ++--- drivers/staging/imx-drm/imx-drm.h |3 +-- drivers/staging/imx-drm/imx-hdmi.c |3 +-- driv

[PATCH RFC 46/46] imx-drm: pass an IPU ID to crtc and core (needs work)

2014-01-02 Thread Russell King
code. This gives a method by which we can try to solve this. However, we're still stuck with trying to guess the IPU ID in the IPU driver as we don't have a positive way to identify this. This needs to be resolved. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-

[PATCH RFC 24/46] imx-drm: provide common connector mode validation function

2014-01-02 Thread Russell King
Provide a common connector mode validation function, which can be used to limit the available modes according to other components in the system. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c |7 +++ drivers/staging/imx-drm/imx-drm.h |3

[PATCH RFC 28/46] imx-drm: imx-hdmi: convert to a component device

2014-01-02 Thread Russell King
Convert imx-hdmi to be a component device; it will bind and unbind at the appropriate moment in the main DRM driver's functions. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-hdmi.c | 41 +-- 1 files changed, 29 insertions(+), 12 dele

[PATCH RFC 25/46] imx-drm: simplify setup of panel format

2014-01-02 Thread Russell King
supplied fields there to configure the CRTC. Signed-off-by: Russell King --- drivers/staging/imx-drm/imx-drm-core.c | 18 -- drivers/staging/imx-drm/imx-drm.h |4 ++-- drivers/staging/imx-drm/imx-hdmi.c |3 +-- drivers/staging/imx-drm/imx-ldb.c

[PATCH RFC 27/46] imx-drm: convert to componentised device support

2014-01-02 Thread Russell King
Use the componentised device support for imx-drm. This requires all the sub-components and the master device to register with the component device support. Signed-off-by: Russell King --- arch/arm/boot/dts/imx51-babbage.dts| 10 ++- arch/arm/boot/dts/imx53-m53evk.dts |8

[PATCH RFC 26/46] drivers/base: provide an infrastructure for componentised subsystems

2014-01-02 Thread Russell King
itialised in the conventional way. When any of the components or superdevice are removed from the system, we unbind the superdevice, thereby taking the subsystem down. Signed-off-by: Russell King --- drivers/base/Makefile |2 +- drivers/base/component.c | 379

  1   2   3   4   5   6   >