[PATCH 7/7] drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function

2017-10-13 Thread Chen-Yu Tsai
Initially we configured the PAD_CTRL1 register at probe/bind time. However it seems the HDMI controller will modify some of the bits in this register by itself. On the A10 it is particularly annoying as it toggles the output invert bits, which inverts the colors on the display output. The U-boot

[PATCH 0/7] drm/sun4i: More cleanups

2017-10-13 Thread Chen-Yu Tsai
Hi, Here's another bunch of cleanups for sun4i-drm. Most of these were found while working on A10/A20 DRM and HDMI support. To be clear, nothing was broken before these patches. Patch 1 trims the sun4i-drm probe sequence by not adding repeating components. The component can deal with duplicates,

[PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-13 Thread Chen-Yu Tsai
The display backend, as well as other peripherals that have a DRAM clock gate and access DRAM directly, bypassing the system bus, address the DRAM starting from 0x0, while physical addresses the system uses starts from 0x4000 (or 0x2000 in A80's case). Correct the address configured into

[PATCH 2/7] drm/sun4i: backend: Create regmap after access is possible

2017-10-13 Thread Chen-Yu Tsai
The backend has various clocks and reset controls that need to be enabled and deasserted before register access is possible. Move the creation of the regmap to after the clocks and reset controls have been configured where it makes more sense. Signed-off-by: Chen-Yu Tsai ---

[PATCH 1/7] drm/sun4i: don't add components that are already in the queue

2017-10-13 Thread Chen-Yu Tsai
Even though the components framework can handle duplicate entries, the extra entries cause a lot more debug messages to be generated, which would be confusing to developers not familiar with our driver and the framework in general. Instead, we can scan the relatively small queue and check if the

[PATCH 6/7] drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits

2017-10-13 Thread Chen-Yu Tsai
While debugging inverted color from the HDMI output on the A10, I found that the lowest 3 bits were set. These were cleared on A20 boards that had normal display output. By manually toggling these bits the mapping of the color components to these bits was found. While these are not used anywhere,

[PATCH 3/7] drm/sun4i: backend: Use drm_fb_cma_get_gem_addr() to get display memory

2017-10-13 Thread Chen-Yu Tsai
Commit 4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()") adds a new helper, which covers fetching a drm_framebuffer's GEM object and calculating the buffer address for a given plane. This patch uses this helper to replace our own open coded version of the same function.

[PATCH 4/7] drm/sun4i: backend: Add comment explaining why registers are cleared

2017-10-13 Thread Chen-Yu Tsai
Many of the backend's layer configuration registers have undefined default values. This poses a risk as we use regmap_update_bits in some places, and don't overwrite the whole register. At probe/bind time we explicitly clear all the control registers by writing 0 to them. This patch adds a more

[PATCH v2] drm/vc4: Fix sleeps during the IRQ handler for DSI transactions.

2017-10-13 Thread Eric Anholt
VC4's DSI1 has a bug where the AXI connection is broken for 32-bit writes from the CPU, so we use the DMA engine to DMA 32-bit values into registers instead. That sleeps, so we can't do it from the top half. As a solution, use an interrupt thread so that all our writes happen when sleeping is is

[git pull] drm fixes for v4.14-rc5

2017-10-13 Thread Dave Airlie
Hi Linus, Couple of the arm people seem to wake up so this has imx and msm fixes, along with a bunch of i915 stable bounds fixes and an amdgpu regression fix. All seems pretty okay for now. Dave. The following changes since commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f: Linux 4.14-rc4

Re: [Outreachy kernel] [PATCH v13 2/3] drm/tinydrm: Move tinydrm_of_find_backlight to backlight.c

2017-10-13 Thread Rob Clark
On Fri, Oct 13, 2017 at 4:25 PM, Sean Paul wrote: > On Fri, Oct 13, 2017 at 04:11:43PM +0530, Meghana Madhyastha wrote: >> Rename tinydrm_of_find_backlight to backlight_get and move it >> to linux/backlight.c so that it can be used by other drivers. > > [apologies if this

[Bug 102809] Rust shadows(?) flash random colours

2017-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102809 --- Comment #12 from bugzilla.i...@spamgourmet.com --- Using the patch I now no longer have the flashes occurring in game. (In reply to Nicolai Hähnle from comment #11) > Created attachment 134808 [details] [review] > possible fix > > Please

Re: [Outreachy kernel] [PATCH v13 2/3] drm/tinydrm: Move tinydrm_of_find_backlight to backlight.c

2017-10-13 Thread Noralf Trønnes
Den 13.10.2017 22.25, skrev Sean Paul: On Fri, Oct 13, 2017 at 04:11:43PM +0530, Meghana Madhyastha wrote: Rename tinydrm_of_find_backlight to backlight_get and move it to linux/backlight.c so that it can be used by other drivers. [apologies if this has been brought up in previous versions, I

[Bug 102820] [bisected] commit ebbf7337e2daacacef3e01114e6be68a2a4f11b4 prevents X11 from starting

2017-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=102820 --- Comment #6 from dwagner --- Just as an update: This very bug still occurs with https://cgit.freedesktop.org/~agd5f/linux/log/?h=amd-staging-drm-next as of today, and it is still fixed by reverting commit

[Bug 196125] [Regression] AMD Radeon RX 480 flickering on HDMI port with Linux 4.11.4

2017-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=196125 --- Comment #7 from cont...@florentflament.com --- I haven't experienced any flickering for a while (be it with Wayland or Xorg, one monitor connected to a HDMI port and one another to a DisplayPort). This seems to have been fixed. $ cat

Re: [PATCH 3/9] drm/panel: simple: make it possible to override LCD bus format

2017-10-13 Thread Rob Herring
On Wed, Oct 11, 2017 at 01:23:35PM +0200, Lothar Waßmann wrote: > The baseboards for the Ka-Ro electronics series of i.MX modules > use a 24bit LCD interface, no matter what LCD bus width the SoC on the > module provides and what the LCD panel expects. LCDs with 6bit per color > will ignore the 2

[Bug 196615] amdgpu - resume from suspend is no longer working on rx480

2017-10-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=196615 cont...@florentflament.com changed: What|Removed |Added CC||cont...@florentflament.com

Re: [PATCH v3 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Andrey Grodzovsky
On 10/13/2017 05:01 PM, Leo wrote: On 2017-10-13 04:36 PM, Andrey Grodzovsky wrote: On 10/13/2017 03:29 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* The following functions were

Re: [PATCH v3 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Leo
On 2017-10-13 04:36 PM, Andrey Grodzovsky wrote: On 10/13/2017 03:29 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* The following functions were considered:

Re: [Outreachy kernel] [PATCH v3] drm/amd/powerplay: Remove unnecessary cast on void pointer

2017-10-13 Thread Julia Lawall
On Sat, 14 Oct 2017, Harsha Sharma wrote: > Done with following coccinelle patch > > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > | > ((T *)x)[...] > | > ((T*)x)->f > | > > - (T*) > e > ) > > Signed-off-by: Harsha Sharma >

Re: [PATCH v3 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Andrey Grodzovsky
On 10/13/2017 03:29 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* The following functions were considered: amdgpu_dm_find_first_crtc_matching_connector: use for_each_new - Old

Re: [Outreachy kernel] [PATCH v13 3/3] drm/tinydrm: Add devres versions of backlight_get

2017-10-13 Thread Sean Paul
On Fri, Oct 13, 2017 at 04:12:55PM +0530, Meghana Madhyastha wrote: > Add devm_backlight_get and the corresponding release > function because some drivers use devres versions of functions > for requiring device resources. > This patch looks fine, just update the names to be consistent with the

Re: [Outreachy kernel] [PATCH v13 2/3] drm/tinydrm: Move tinydrm_of_find_backlight to backlight.c

2017-10-13 Thread Sean Paul
On Fri, Oct 13, 2017 at 04:11:43PM +0530, Meghana Madhyastha wrote: > Rename tinydrm_of_find_backlight to backlight_get and move it > to linux/backlight.c so that it can be used by other drivers. [apologies if this has been brought up in previous versions, I haven't been following closely] I

Re: [PATCH v3 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Harry Wentland
On 2017-10-13 03:29 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Use the correct for_each_new/old_* iterators instead of for_each_* > > The following functions were considered: > > amdgpu_dm_find_first_crtc_matching_connector: use for_each_new > - Old

[Bug 103102] Cannot wake-up with an AMD RX 480 on Linux 4.13 and Linux 4.14

2017-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=103102 --- Comment #10 from Hadrien --- I built v4.12.5 from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git instead of using a prebuilt kernel from http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.12.5/

Re: [PATCH] drm/amd/display: fix ifnullfree.cocci warnings

2017-10-13 Thread Harry Wentland
On 2017-10-12 07:17 PM, kbuild test robot wrote: > drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:3-8: > WARNING: NULL check before freeing functions like kfree, debugfs_remove, > debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider > reorganizing relevant

[pull] amdgpu drm-next-4.15-dc

2017-10-13 Thread Alex Deucher
Hi Dave, Updates for DC against your drm-next-amd-dc-staging branch. - Fix for iterator changes - Misc cleanups The following changes since commit e7b8e99bed73e9c42f1c074ad6009cb59a79bd52: amdgpu/dc: fixup for new apis - probably wrong (2017-10-09 11:22:07 +1000) are available in the git

Re: [PATCH v2] drm: Replace kzalloc with kcalloc

2017-10-13 Thread Sean Paul
On Fri, Oct 13, 2017 at 10:58:33AM +0300, Jani Nikula wrote: > On Fri, 13 Oct 2017, Harsha Sharma wrote: > > Prefer kcalloc over kzalloc to allocate an array. > > This patch fixes checkcpatch issue. > > > > Signed-off-by: Harsha Sharma > >

[Bug 101900] No HDMI HBR audio on Polaris (no TrueHD, no Atmos, no Neo:X, no HD Master audio)

2017-10-13 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=101900 --- Comment #11 from Harry Wentland --- So, unbeknowst to me, we never supported HBR audio (i.e. TrueHD, etc.) with DC. We would like to enable it but it's not top priority right now. -- You are receiving this mail

Re: [PATCH] drm/amd/dc: fix semicolon.cocci warnings

2017-10-13 Thread Harry Wentland
On 2017-10-12 07:35 PM, kbuild test robot wrote: > drivers/gpu/drm/amd/amdgpu/../display/dc/gpio/gpio_service.c:134:2-3: > Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > Fixes: 80be23c57868 ("drm/amd/dc: Add dc display driver

[PATCH v3 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread sunpeng.li
From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* The following functions were considered: amdgpu_dm_find_first_crtc_matching_connector: use for_each_new - Old from_state_var flag was always choosing the new state

Re: [PATCH 2/6] drm/amd/display: Use new DRM API where possible

2017-10-13 Thread Harry Wentland
On 2017-10-13 01:26 PM, Andrey Grodzovsky wrote: > > > On 10/13/2017 12:18 PM, Harry Wentland wrote: >> On 2017-10-12 05:15 PM, sunpeng...@amd.com wrote: >>> From: "Leo (Sunpeng) Li" >>> >>> To conform to DRM's new API, we should not be accessing a DRM object's >>> internal

Re: [PATCH v2 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Andrey Grodzovsky
On 10/13/2017 12:35 PM, Leo wrote: On 2017-10-13 11:56 AM, Andrey Grodzovsky wrote: On 10/13/2017 11:41 AM, Leo wrote: On 2017-10-13 11:03 AM, Andrey Grodzovsky wrote: On 10/12/2017 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct

Re: [Outreachy kernel] [PATCH v2] drm/amd/powerplay: Remove unnecessary cast on void pointer

2017-10-13 Thread Julia Lawall
> @@ -3400,7 +3400,7 @@ static int smu7_read_sensor(struct pp_hwmgr *hwmgr, int > idx, > static int smu7_find_dpm_states_clocks_in_dpm_table(struct pp_hwmgr *hwmgr, > const void *input) > { > const struct phm_set_power_state_input *states = > - (const struct

Re: [PATCH 0/6] Use new DRM API where possible, and cleanups.

2017-10-13 Thread Maarten Lankhorst
Op 12-10-17 om 23:15 schreef sunpeng...@amd.com: > From: "Leo (Sunpeng) Li" > > Hi Dave, > > This series reworks the previous patch. Patch 1 is a v2 of the previous, > and additional patches are from the feedback received. They apply on top > of your drm-next-amd-dc-staging

Re: [PATCH 2/6] drm/amd/display: Use new DRM API where possible

2017-10-13 Thread Andrey Grodzovsky
On 10/13/2017 12:18 PM, Harry Wentland wrote: On 2017-10-12 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" To conform to DRM's new API, we should not be accessing a DRM object's internal state directly. Rather, the DRM for_each_old/new_* iterators, and

[PATCH] drm: panel: simple: add Toshiba LT089AC19000

2017-10-13 Thread Lucas Stach
Only exposes a single mode and not a complete display timing, as the datasheet is rather vague about the minimum/maximum values. Signed-off-by: Lucas Stach --- .../display/panel/toshiba,lt089ac29000.txt | 8 +++ drivers/gpu/drm/panel/panel-simple.c

Re: [PATCH v2 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Leo
On 2017-10-13 11:56 AM, Andrey Grodzovsky wrote: On 10/13/2017 11:41 AM, Leo wrote: On 2017-10-13 11:03 AM, Andrey Grodzovsky wrote: On 10/12/2017 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of

Re: [PATCH v2 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Andrey Grodzovsky
On 10/12/2017 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* List of affected functions: amdgpu_dm_find_first_crtc_matching_connector: use for_each_new - Old from_state_var flag was

Re: [PATCH 0/6] Use new DRM API where possible, and cleanups.

2017-10-13 Thread Harry Wentland
Patches 3-6 are Reviewed-by: Harry Wentland Harry On 2017-10-12 05:15 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > Hi Dave, > > This series reworks the previous patch. Patch 1 is a v2 of the previous, > and additional patches are

Re: [PATCH 6/6] drm/amd/display: Remove useless pcrtc pointer

2017-10-13 Thread Alex Deucher
On Thu, Oct 12, 2017 at 5:15 PM, wrote: > From: "Leo (Sunpeng) Li" > > in amdgpu_dm_atomic_commit_tail. Just use crtc instead. > > Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Alex Deucher > --- >

Re: [PATCH 5/6] drm/amd/display: Fix typo

2017-10-13 Thread Alex Deucher
On Thu, Oct 12, 2017 at 5:15 PM, wrote: > From: "Leo (Sunpeng) Li" > > undersacn -> underscan > > Signed-off-by: Leo (Sunpeng) Li Reviewed-by: Alex Deucher > --- >

Re: [PATCH 2/6] drm/amd/display: Use new DRM API where possible

2017-10-13 Thread Harry Wentland
On 2017-10-12 05:15 PM, sunpeng...@amd.com wrote: > From: "Leo (Sunpeng) Li" > > To conform to DRM's new API, we should not be accessing a DRM object's > internal state directly. Rather, the DRM for_each_old/new_* iterators, > and drm_atomic_get_old/new_* interface should be

Re: [PATCH v2 0/9] Exynos DRM: rewrite IPP subsystem and userspace API

2017-10-13 Thread Tobias Jakobi
Hello everyone, I have finished some first (working) version of my mpv video backend for IPPv2. You can find the tree here: https://github.com/tobiasjakobi/mpv I've also created some RFC pull request upstream, to get some input on the current patches: https://github.com/mpv-player/mpv/pull/4986

Re: [PATCH v2 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Andrey Grodzovsky
On 10/13/2017 11:41 AM, Leo wrote: On 2017-10-13 11:03 AM, Andrey Grodzovsky wrote: On 10/12/2017 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* List of affected functions:

Re: [Outreachy kernel] [PATCH] drm/amd/powerplay: Remove unnecessary cast on void pointer

2017-10-13 Thread Julia Lawall
On Fri, 13 Oct 2017, Harsha Sharma wrote: > Done with following coccinelle patch > > @r@ > expression x; > void* e; > type T; > identifier f; > @@ > ( > *((T *)e) > | > ((T *)x)[...] > | > ((T*)x)->f > | > > - (T*) > e > ) > > Signed-off-by: Harsha Sharma >

Re: [PATCH] drm/tinydrm: Remove explicit .best_encoder assignment

2017-10-13 Thread Noralf Trønnes
Den 10.10.2017 22.58, skrev Haneen Mohammed: Since the driver is relying on the atomic helpers, remove the explicit .best_encoder assignment and let the core call drm_atomic_helper_best_encoder(). Signed-off-by: Haneen Mohammed --- Thanks, applied to drm-misc.

Re: [PATCH v3] drm/tinydrm: Replace dev_error with DRM_DEV_ERROR

2017-10-13 Thread Noralf Trønnes
Den 07.10.2017 00.17, skrev Harsha Sharma: Convert instances of dev_error to DRM_DEV_ERROR as we have DRM_DEV_ERROR variants of drm print macros. Signed-off-by: Harsha Sharma --- Thanks, applied to drm-misc. Noralf. Changes in v3: -Solve merge conflicts

Re: [PATCH v2 1/6] drm/amd/display: Use DRM new-style object iterators.

2017-10-13 Thread Leo
On 2017-10-13 11:03 AM, Andrey Grodzovsky wrote: On 10/12/2017 05:15 PM, sunpeng...@amd.com wrote: From: "Leo (Sunpeng) Li" Use the correct for_each_new/old_* iterators instead of for_each_* List of affected functions: amdgpu_dm_find_first_crtc_matching_connector: use

Re: tracing, dma-buf: Remove unused trace event dma_fence_annotate_wait_on

2017-10-13 Thread Christian König
Am 13.10.2017 um 16:06 schrieb Steven Rostedt: From: Steven Rostedt (VMware) Commit e941759c74 ("fence: dma-buf cross-device synchronization") added trace event fence_annotate_wait_on, but never used it. It was renamed to dma_fence_annotate_wait_on by commit f54d186700

Re: [PATCH 2/2] drm/udl: Reading all edid blocks in DRM/UDL driver

2017-10-13 Thread Alex Deucher
On Thu, Oct 12, 2017 at 8:13 PM, Robert Tarasov wrote: > Now DRM/UDL driver retreives all edid data blocks instead of only base one. > Previous approch could lead to improper initialization of video mode with > certain monitors. > > Signed-off-by: Robert Tarasov

Re: [PATCH 1/2] drm/udl: Fixed problem with UDL adpater reconnection

2017-10-13 Thread Alex Deucher
On Thu, Oct 12, 2017 at 8:13 PM, Robert Tarasov wrote: > Fixed problem with DisplayLink and DisplayLink certified adapers in drm/udl > driver when adapter doesn't want to work if it was initialized with > disconnected DVI cable by enabling drm connectot polling and

[PATCH 48/48] drm: omapdrm: dss: Store the registered plls array in struct dss_device

2017-10-13 Thread Laurent Pinchart
As part of an effort to remove the usage of global variables in the driver, store the registered plls array in the dss_device structure instead of a global variable. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dispc.c | 4 ++--

[PATCH 44/48] drm: omapdrm: dispc: Pass DISPC pointer to dispc_ops operations

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). In order to allow the omapdrm side to call the dispc_ops with a DISPC pointer, we also

[PATCH 42/48] drm: omapdrm: dss: Remove unused functions prototypes

2017-10-13 Thread Laurent Pinchart
The omap_dss_register_driver(), omap_dss_unregister_driver() and dispc_enable_gamma_table() functions don't exist anymore, remove their prototypes. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dss.h | 1 -

[PATCH 45/48] drm: omapdrm: dispc: Pass DISPC pointer to remaining dispc API functions

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DISPC private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DISPC private data dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 47/48] drm: omapdrm: dss: Store the debugfs root directory in struct dss_device

2017-10-13 Thread Laurent Pinchart
As part of an effort to remove the usage of global variables in the driver, store the debugfs root directory in the dss_device structure instead of a global variable. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dispc.c | 2 +-

[PATCH 39/48] drm: omapdrm: dsi: Store the struct device pointer in struct dsi_data

2017-10-13 Thread Laurent Pinchart
The dsi_data structure stores a pointer to a struct platform_device. The driver only uses the dev member of the platform device structure. Store the struct device pointer instead and use it directly. Signed-off-by: Laurent Pinchart ---

[PATCH 38/48] drm: omapdrm: dsi: Use dev pointer directly in dsi_bind() function

2017-10-13 Thread Laurent Pinchart
The dsi_bind() function receives a pointer to a struct device that it casts to a struct platform_device, only to use the platform device's dev field through the code. Use the dev pointer directly. While at it rename the struct platform_device pointer dsidev to pdev to make it more explicit.

[PATCH 33/48] drm: omapdrm: venc: Allocate the venc private data structure dynamically

2017-10-13 Thread Laurent Pinchart
The venc private data structure is currently stored as a global variable. While no platform with multiple VENC encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart

[PATCH 43/48] drm: omapdrm: dss: Pass omap_drm_private pointer to dss_mgr_ops

2017-10-13 Thread Laurent Pinchart
The dss_mgr_ops operations implemented by the omapdrm side have to look up the omap_crtc objects from global variables as they are only passed a channel number. In order to remove global variables pass the omap_drm_private pointer to the dss_mgr_ops. This requires storing a pointer to the

[PATCH 40/48] drm: omapdrm: dsi: Don't pass channel to dispc init/uninit functions

2017-10-13 Thread Laurent Pinchart
The dsi_display_init_dispc() and dsi_display_uninit_dispc() functions take a channel argument that is reduntant as it is always identical to the dsi->output.dispc_channel. Remove the argument and use the field directly in the functions to avoid misuse. Signed-off-by: Laurent Pinchart

[PATCH 29/48] drm: omapdrm: dss: Remove dss_get_hdmi_venc_clk_source() function

2017-10-13 Thread Laurent Pinchart
The function is unused, remove it. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dss.c | 14 -- drivers/gpu/drm/omapdrm/dss/dss.h | 1 - 2 files changed, 15 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c

[PATCH 27/48] drm: omapdrm: dss: Pass DSS pointer to dss clock functions

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 41/48] drm: omapdrm: dss: Pass omap_dss_device pointer to dss_mgr_*() functions

2017-10-13 Thread Laurent Pinchart
The dss_mgr_*() functions take a channel argument to identify the channel they operate on. This prevents the functions from accessing driver data structures without resorting to global variables. In an effort to remove global variables, pass the omap_dss_device pointer associated with the channel

[PATCH 36/48] drm: omapdrm: dsi: Pass the dsi_data pointer to internal functions

2017-10-13 Thread Laurent Pinchart
Internal dsi functions take a pointer to the DSI platform_device and then cast it to a dsi_data pointer. That's pointless as the caller already has the dsi_data pointer. Pass it directly instead of the platform_device pointer. Signed-off-by: Laurent Pinchart

[PATCH 37/48] drm: omapdrm: dsi: Combine two commonly used inline functions

2017-10-13 Thread Laurent Pinchart
The dsi_get_dsidrv_data() and dsi_get_dsidev_from_dssdev() inline functions convert a struct omap_dss_device pointer to the corresponding struct platform_device, and a struct platform_device pointer to the corresponding struct dsi_data. They are nearly always called together without any use of the

[PATCH 30/48] drm: omapdrm: dss: Allocate the DSS private data structure dynamically

2017-10-13 Thread Laurent Pinchart
The DSS private data structure is currently stored as a global variable. While no platform with multiple DSS devices currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. As a first step to the fix, allocate the DSS private data structure

[PATCH 32/48] drm: omapdrm: hdmi5: Allocate the omap_hdmi data structure dynamically

2017-10-13 Thread Laurent Pinchart
The omap_hdmi private data structure is currently stored as a global variable. While no platform with multiple HDMI5 encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart

[PATCH 34/48] drm: omapdrm: sdi: Allocate the sdi private data structure dynamically

2017-10-13 Thread Laurent Pinchart
The sdi private data structure is currently stored as a global variable. While no platform with multiple SDI encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart ---

[PATCH 35/48] drm: omapdrm: dsi: Make wait_for_bit_change() return a status

2017-10-13 Thread Laurent Pinchart
The wait_for_bit_change() function returns the value of the bit it polls. This requires the caller to compare the return value to the expected bit value. As all the existing callers need is to check whether the bit has reached the expected value, it's easier to return a boolean status from the

[PATCH 31/48] drm: omapdrm: hdmi4: Allocate the omap_hdmi data structure dynamically

2017-10-13 Thread Laurent Pinchart
The omap_hdmi private data structure is currently stored as a global variable. While no platform with multiple HDMI4 encoders currently exists nor is planned, this doesn't comply with the kernel device model and should thus be fixed. Signed-off-by: Laurent Pinchart

[PATCH 20/48] drm: omapdrm: Merge the omapdrm and omapdss drivers

2017-10-13 Thread Laurent Pinchart
The split between the omapdss and omapdrm driver is historic and was due to other userspace APIs (FBDEV and V4L2) being supported in addition to DRM/KMS. Now that the drivers only supports the DRM/KMS API, there is no need to keep them separate anymore. Merge the two drivers and remove the now

[PATCH 28/48] drm: omapdrm: dss: Pass DSS pointer to remaining dss functions

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 23/48] drm: omapdrm: dss: Pass PLL pointer to dss_ctrl_pll_enable()

2017-10-13 Thread Laurent Pinchart
This will allow accessing the PLL data to get the DSS device pointer, removing the need to access the global DSS private data. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dss.c | 13 +++-- drivers/gpu/drm/omapdrm/dss/dss.h

[PATCH 26/48] drm: omapdrm: dss: Pass DSS pointer to dss_get_*_clk_source()

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 22/48] drm: omapdrm: dss: Pass DSS private structure to runtime PM functions

2017-10-13 Thread Laurent Pinchart
To prepare for the removal of the global variable storing DSS private data, pass its pointer to the dss_runtime_{get,put}() functions. As this requires getting hold of the DSS private structure in the callers, we expose the structure through an opaque pointer that can be retrieved through a new

[PATCH 24/48] drm: omapdrm: sdi: Pass DSS pointer to dss_sdi_*() functions

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 25/48] drm: omapdrm: dss: Pass DSS pointer to dss_ops operations

2017-10-13 Thread Laurent Pinchart
This removes the need to access the global DSS private data in those functions (both for the current accesses and the future ones that will be introduced when allocating the DSS device dynamically). Signed-off-by: Laurent Pinchart ---

[PATCH 19/48] drm: omapdrm: displays: Get encoder source at connect time

2017-10-13 Thread Laurent Pinchart
The encoder drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move

[PATCH 21/48] drm: omapdrm: dss: Support passing private data to debugfs show handlers

2017-10-13 Thread Laurent Pinchart
To simplify implementation of debugfs seq_file show handlers, the driver passes the pointer to the show function through the debugfs_create_file data pointer. This prevents using the pointer to pass driver private data to the show handler, and requires all handlers to use global variables to

[PATCH 16/48] drm: omapdrm: displays: Remove OF node check in panel drivers

2017-10-13 Thread Laurent Pinchart
No panel is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/panel-dpi.c| 3 --- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c

[PATCH 14/48] drm: omapdrm: displays: Remove OF node check in connector drivers

2017-10-13 Thread Laurent Pinchart
No connector is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 3 --- drivers/gpu/drm/omapdrm/displays/connector-dvi.c

[PATCH 15/48] drm: omapdrm: displays: Remove OF node check in encoder drivers

2017-10-13 Thread Laurent Pinchart
No encoder is instantiated through platform data anymore, there is no need to check for OF node presence. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/encoder-opa362.c| 5 - drivers/gpu/drm/omapdrm/displays/encoder-tfp410.c|

[PATCH 18/48] drm: omapdrm: displays: Get panel source at connect time

2017-10-13 Thread Laurent Pinchart
The connector drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move

[PATCH 17/48] drm: omapdrm: displays: Get connector source at connect time

2017-10-13 Thread Laurent Pinchart
The connector drivers need a handle to the source they are connected to in order to control the source. All drivers get that handle at probe time, resulting in probe deferral when the source hasn't been probed yet. However they don't need the handle until their connect handler is called. Move

[PATCH 11/48] drm: omapdrm: Use unsigned int type

2017-10-13 Thread Laurent Pinchart
The kernel favours 'unsigned int' over plain 'unsigned'. Replace all occurences of the latter by the former. This avoid lots of checkpatch complaints in patches that touch lines where a plain 'unsigned' is used. Signed-off-by: Laurent Pinchart ---

[PATCH 13/48] drm: omapdrm: connector-analog-tv: Remove tvc_of_match forward declaration

2017-10-13 Thread Laurent Pinchart
The tvc_of_match variable is never referenced before its definition. Remove the forward declaration. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/displays/connector-analog-tv.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH 12/48] drm: omapdrm: Split init and cleanup from probe and remove functions

2017-10-13 Thread Laurent Pinchart
When merging the omapdrm and omapdss drivers there will be not omapdrm platform device anymore, and thus no associated probe and remove functions. To prepare for that, split all the initialization code from the probe function to make it usable without a platform device. Similarly, split the

[PATCH 09/48] drm: omapdrm: Deconstruct the omap_drv.h header.

2017-10-13 Thread Laurent Pinchart
The number of function declarations in the omap_drv.h degrades readability. To fix it, create new header files for each part of the driver and move the related functions. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_connector.h | 37

[PATCH 10/48] drm: omapdrm: Use kernel integer types

2017-10-13 Thread Laurent Pinchart
The standard kernel integer types are [us]{8,16,32}. Use them instead of the u?int{8,16,32}_t types. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_crtc.c | 12 - drivers/gpu/drm/omapdrm/omap_crtc.h | 2 +-

[PATCH 05/48] drm: omapdrm: dss: Set the DMA coherent mask

2017-10-13 Thread Laurent Pinchart
When merging the omapdrm and omapdss drivers the omapdrm virtual platform device will disappear, and the omapdss platform device will be used for DMA memory allocation. To prepare for that, set the DMA coherent mask for the device. Signed-off-by: Laurent Pinchart

[PATCH 08/48] drm: omapdrm: venc: Return error code on OF parsing failure

2017-10-13 Thread Laurent Pinchart
The venc_probe_of() function has an error cleanup path that returns success instead of an error code. Fix it. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/venc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 06/48] drm: omapdrm: dss: Make dss_dump_clocks() function static

2017-10-13 Thread Laurent Pinchart
The function isn't used outside of its compilation unit, make it static. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/dss.c | 4 +++- drivers/gpu/drm/omapdrm/dss/dss.h | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 07/48] drm: omapdrm: dpi: Remove dpi_data port_initialized field

2017-10-13 Thread Laurent Pinchart
The dpi_data structure port_initialized field is used to check in the cleanup path whether the DPI has been initialized. This can be performed through the associated device_node data field instead. Remove the port_initialized field. Signed-off-by: Laurent Pinchart

[PATCH 04/48] drm: omapdrm: Merge the omapdss and omapdss-base modules

2017-10-13 Thread Laurent Pinchart
There's no need for the omapdss-base code to be part of a separate module. Merge it with the omapdss module. This allows removing the exports for internal symbols. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/Kconfig | 4

[PATCH 02/48] drm: omapdrm: Pass drm_device to omap_gem_resume()

2017-10-13 Thread Laurent Pinchart
The omap_gem_resume() function is internal to the driver. Pass it a drm_device pointer that the caller already has instead of looking it up from device data. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/omap_drv.c | 2 +-

[PATCH 00/48] omapdrm: Merge omapdrm and omapdss

2017-10-13 Thread Laurent Pinchart
Hello, This patch series merges the omapdrm and omapdss drivers into a single driver called omapdrm. The split in two drivers was historical, in order to support the FBDEV, V4L2 and DRM/KMS APIs. Now that the driver supports DRM/KMS only there's no need to keep two seperate drivers. The series

[PATCH 03/48] drm: omapdrm: Remove unused omap_dss_find_device() function

2017-10-13 Thread Laurent Pinchart
The omap_dss_find_device() function is unused. Remove it. Signed-off-by: Laurent Pinchart --- drivers/gpu/drm/omapdrm/dss/display.c | 14 -- drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 --- 2 files changed, 17 deletions(-) diff --git

[PATCH 01/48] drm: omapdrm: dpi: Don't treat GPIO probe deferral as an error

2017-10-13 Thread Laurent Pinchart
There's no need to print an error message on probe deferral, that's a normal situation. Probe deferral debugging can be performed by enabling the related debug messages in the drivers core. Signed-off-by: Laurent Pinchart ---

  1   2   >