[PATCH v2 02/12] drm/file: Don't set master on in-kernel clients

2018-06-18 Thread Noralf Trønnes
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index d4588d33f91c

[PATCH v2 00/12] drm: Add generic fbdev emulation

2018-06-18 Thread Noralf Trønnes
nregister code - tinydrm: Use drm_fbdev_generic_setup() and remove drm_fb_cma_fbdev_init_with_funcs() David Herrmann (1): drm: provide management functions for drm_file Noralf Trønnes (11): drm/file: Don't set master on in-kernel clients drm: Make ioctls available for in-kernel clients d

[PATCH v2 01/12] drm: provide management functions for drm_file

2018-06-18 Thread Noralf Trønnes
(not that I am aware of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann Signed-off-by: Noralf Trønnes Reviewed-by: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 305 +++-- drivers

Re: [PATCH v2 0/4] drm/tinydrm: new dirver for ILI9341 displays

2018-06-05 Thread Noralf Trønnes
(cc: drm-misc maintainers) Den 04.06.2018 03.21, skrev David Lechner: On 6/3/18 5:00 PM, Noralf Trønnes wrote: Den 25.05.2018 21.36, skrev David Lechner: This series adds a new tinydrm driver for the Ilitek ILI9341 controller and a 2.4" display panel that uses this controller.

Re: [PATCH v2 0/4] drm/tinydrm: new dirver for ILI9341 displays

2018-06-03 Thread Noralf Trønnes
Den 25.05.2018 21.36, skrev David Lechner: This series adds a new tinydrm driver for the Ilitek ILI9341 controller and a 2.4" display panel that uses this controller. David, do you have commit rights now? Noralf. A few things to note here: * The datasheet for this display[1] doesn't have a

Re: [PATCH 4/9] drm: Begin an API for in-kernel clients

2018-05-28 Thread Noralf Trønnes
Den 24.05.2018 10.42, skrev Daniel Vetter: On Wed, May 23, 2018 at 04:34:06PM +0200, Noralf Trønnes wrote: This the beginning of an API for in-kernel clients. First out is a way to get a framebuffer backed by a dumb buffer. Only GEM drivers are supported. The original idea of using

Re: [PATCH 5/9] drm/fb-helper: Add generic fbdev emulation .fb_probe function

2018-05-25 Thread Noralf Trønnes
Den 24.05.2018 11.16, skrev Daniel Vetter: On Wed, May 23, 2018 at 04:34:07PM +0200, Noralf Trønnes wrote: This is the first step in getting generic fbdev emulation. A drm_fb_helper_funcs.fb_probe function is added which uses the DRM client API to get a framebuffer backed by a dumb buffer

Re: [PATCH] drm/fb-helper: Fix typo on kerneldoc

2018-05-24 Thread Noralf Trønnes
const struct fb_fillrect *rect) Acked-by: Noralf Trønnes <nor...@tronnes.org> ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH 7/9] drm/cma-helper: Use the generic fbdev emulation

2018-05-23 Thread Noralf Trønnes
drm_fb_cma_fbdev_init_with_funcs(). Cc: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_cma_helper.c | 365 +--- include/drm/drm_fb_cma_helper.h | 3 - 2 files changed, 4

[PATCH 5/9] drm/fb-helper: Add generic fbdev emulation .fb_probe function

2018-05-23 Thread Noralf Trønnes
. This hack will be removed when tinydrm moves to vmalloc buffers. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 164 include/drm/drm_fb_helper.h | 26 +++ 2 files changed, 190 insertions(+) diff --git a/d

[PATCH 8/9] drm/client: Add client callbacks

2018-05-23 Thread Noralf Trønnes
Add client callbacks and hook them up. Add a list of clients per drm_device. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c| 246 +++- drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm

[PATCH 9/9] drm/fb-helper: Finish the generic fbdev emulation

2018-05-23 Thread Noralf Trønnes
This adds a drm_fbdev_generic_setup() function that sets up generic fbdev emulation with client callbacks for lastclose, hotplug and remove/unregister. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 123 i

[PATCH 2/9] drm/file: Don't set master on in-kernel clients

2018-05-23 Thread Noralf Trønnes
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch> --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 6/9] drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap

2018-05-23 Thread Noralf Trønnes
These are needed for pl111 to use the generic fbdev emulation. Cc: Eric Anholt <e...@anholt.net> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/pl111/pl111_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/dri

[PATCH 4/9] drm: Begin an API for in-kernel clients

2018-05-23 Thread Noralf Trønnes
if it wants to support the client API which it probably will when we have a bootsplash client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- Documentation/gpu/drm-client.rst | 12 ++ Documentation/gpu/index.rst | 1 + drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_cl

[PATCH 3/9] drm: Make ioctls available for in-kernel clients

2018-05-23 Thread Noralf Trønnes
Make ioctl wrappers for functions that will be used by the in-kernel API. The following functions are touched: - drm_mode_create_dumb_ioctl() - drm_mode_destroy_dumb_ioctl() - drm_mode_addfb() - drm_mode_rmfb() Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[PATCH 0/9] drm: Add generic fbdev emulation

2018-05-23 Thread Noralf Trønnes
): drm: provide management functions for drm_file Noralf Trønnes (8): drm/file: Don't set master on in-kernel clients drm: Make ioctls available for in-kernel clients drm: Begin an API for in-kernel clients drm/fb-helper: Add generic fbdev emulation .fb_probe function drm/pl111: Set

[PATCH 1/9] drm: provide management functions for drm_file

2018-05-23 Thread Noralf Trønnes
e fops implementations and APIs (not that I am aware of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann <dh.herrm...@gmail.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <d

Re: [PATCH 3/3] drm/tinydrm: new driver for ILI9341 display panels

2018-05-19 Thread Noralf Trønnes
rm/ili9341.c new file mode 100644 index ..2ce4244a68c3 --- /dev/null +++ b/drivers/gpu/drm/tinydrm/ili9341.c @@ -0,0 +1,239 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * DRM driver for Ilitek ILI9341 panels + * + * Copyright 2018 David Lechner <da...@lechnology.com> + * + * B

Re: [PATCH 2/3] dt-bindings: new binding for Ilitek ILI9341 display panels

2018-05-19 Thread Noralf Trønnes
Den 15.05.2018 03.43, skrev David Lechner: This adds a new binding for Ilitek ILI9341 display panels. It includes a compatible string for one display (more can be added in the future). The vendor prefix "noname" is used because the vendor is not known. The YX240QV29-T panel[1] is found, for

Re: [PATCH 1/3] MAINTAINERS: fix path to ilitek,ili9225 device tree bindings

2018-05-19 Thread Noralf Trønnes
Den 15.05.2018 03.43, skrev David Lechner: This fixes the path to the ilitek,ili9225 device tree binding file. Signed-off-by: David Lechner <da...@lechnology.com> --- Reviewed-by: Noralf Trønnes <nor...@tronnes.org> MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: [PATCH] drm/tinydrm/mi0283qt: Always set rotation value

2018-04-30 Thread Noralf Trønnes
Den 24.04.2018 18.52, skrev Noralf Trønnes: Den 23.04.2018 18.16, skrev Tom Callaway: The PiTFT (ili9340) has a hardware reset circuit that resets only on power-on and not on each reboot through a gpio like the rpi-display does. As a result, we need to always apply the rotation value

Re: [PATCH] drm/tinydrm/mi0283qt: Always set rotation value

2018-04-24 Thread Noralf Trønnes
Den 24.04.2018 21.16, skrev Daniel Vetter: On Tue, Apr 24, 2018 at 6:52 PM, Noralf Trønnes <nor...@tronnes.org> wrote: Den 23.04.2018 18.16, skrev Tom Callaway: The PiTFT (ili9340) has a hardware reset circuit that resets only on power-on and not on each reboot through a gpio like t

Re: [PATCH] drm/tinydrm/mi0283qt: Always set rotation value

2018-04-24 Thread Noralf Trønnes
e, plane_state); } Thanks for fixing this. Reviewed-by: Noralf Trønnes <nor...@tronnes.org> ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: mi0283qt driver issues

2018-04-19 Thread Noralf Trønnes
Den 18.04.2018 17.52, skrev Tom Callaway: On 04/18/2018 06:22 AM, Noralf Trønnes wrote: It turns out that the reason for this is that the pitft has a hw reset circuit that resets only on power-on and not on each reboot through a gpio like rpi-display does. When the driver is enabling

Re: mi0283qt driver issues

2018-04-18 Thread Noralf Trønnes
Den 16.04.2018 18.44, skrev Tom Callaway: Noralf, Thanks for the guidance on how to use the mi0283qt driver to run the panel included in the Adafruit 2.8" capacitive PiTFT Plus (running on top of a Raspberry Pi 3). I am working with 4.16.0 (Fedora 28). I can get the driver to load, and have

Re: [Intel-gfx] [RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-16 Thread Noralf Trønnes
Den 16.04.2018 10.21, skrev Daniel Vetter: On Sat, Apr 14, 2018 at 01:52:53PM +0200, Noralf Trønnes wrote: This patchset explores the possibility of having generic fbdev emulation in DRM for drivers that supports dumb buffers which they can export. An API is added to support in-kernel clients

Re: [Intel-gfx] [RFC v4 21/25] drm/fb-helper: Add drm_fb_helper_fb_open/release()

2018-04-16 Thread Noralf Trønnes
Den 16.04.2018 10.46, skrev Daniel Vetter: On Sat, Apr 14, 2018 at 01:53:14PM +0200, Noralf Trønnes wrote: These helpers keep track of fbdev users and drm_driver.last_close will only restore fbdev when actually in use. Additionally the display is turned off when the last user is closing. fbcon

Re: [Intel-gfx] [RFC v4 19/25] drm/client: Finish the in-kernel client API

2018-04-16 Thread Noralf Trønnes
Den 16.04.2018 10.27, skrev Daniel Vetter: On Sat, Apr 14, 2018 at 01:53:12PM +0200, Noralf Trønnes wrote: The modesetting code is already present, this adds the rest of the API. Mentioning the TODO in the commit message would be good. Helps readers like me who have an attention span measured

[RFC v4 21/25] drm/fb-helper: Add drm_fb_helper_fb_open/release()

2018-04-14 Thread Noralf Trønnes
(fb_ops.owner) instead of the driver module. Fix that by ensuring that the driver module is pinned. The functions are not added to the DRM_FB_HELPER_DEFAULT_OPS() macro, because some of its users do set fb_open/release themselves. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drive

[RFC v4 22/25] drm/fb-helper: Add generic fbdev emulation

2018-04-14 Thread Noralf Trønnes
This adds generic fbdev emulation for drivers that supports dumb buffers which they can export. All the driver has to do is call drm_fbdev_generic_setup(). Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c

[RFC v4 24/25] drm/client: Hack: Add bootsplash

2018-04-14 Thread Noralf Trønnes
A hack to test the client API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/client/Kconfig | 9 ++ drivers/gpu/drm/client/drm_bootsplash.c

[RFC v4 25/25] drm/client: Hack: Add DRM VT console client

2018-04-14 Thread Noralf Trønnes
A hack to test the client API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/client/Kconfig | 5 + drivers/gpu/drm/client/Makefile| 3 + drivers/gpu/drm/client/drm_vtcon.c

[RFC v4 20/25] drm/prime: Don't pin module on export for in-kernel clients

2018-04-14 Thread Noralf Trønnes
Avoid pinning the module when exporting a GEM object as a dmabuf. This makes it possible to unload drivers that has in-kernel clients using it. The client is removed on drm_dev_unregister() so no need to pin the driver. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 13/25] drm/fb-helper: Remove struct drm_fb_helper_crtc

2018-04-14 Thread Noralf Trønnes
The stage is now set for a clean removal of drm_fb_helper_crtc. struct drm_client_display is doing its job now. Also remove the drm_fb_helper_funcs->initial_config which has been superseded by drm_driver->initial_client_display. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> ---

[RFC v4 23/25] drm: Add DRM device registered notifier

2018-04-14 Thread Noralf Trønnes
Add a notifier that fires when a new DRM device is registered. This can be used by the bootsplash client to connect to all devices. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_drv.c | 32 include/drm/drm_drv.h | 4 2

[RFC v4 12/25] drm/i915: Add drm_driver->initial_client_display callback

2018-04-14 Thread Noralf Trønnes
on out of intel_fbdev.c since it's not fbdev specific anymore. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c| 19 +-- drivers/gpu/drm/i915/i915_drv.c| 1 + drivers/gpu/drm/i915/intel_drv.h | 11 drivers/gpu/drm/i915/intel_f

[RFC v4 10/25] drm/connector: Add drm_connector_has_preferred_mode/pick_cmdline_mode()

2018-04-14 Thread Noralf Trønnes
Move them over from drm_fb_helper since they are connector functions. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_connector.c| 94 ++ drivers/gpu/drm/drm_fb_helper.c| 75 ++ drivers/g

[RFC v4 15/25] drm/fb-helper: Move modeset config code to drm_client

2018-04-14 Thread Noralf Trønnes
Call the function drm_client_find_display(). No functional change apart from making width/height arguments optional. Some function name/signature changes and whitespace adjustments. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c

[RFC v4 14/25] drm/fb-helper: Remove struct drm_fb_helper_connector

2018-04-14 Thread Noralf Trønnes
No need to maintain a list of registered connectors. Just use the connector iterator. TODO: Remove: - drm_fb_helper_add_one_connector() - drm_fb_helper_single_add_all_connectors() - drm_fb_helper_remove_one_connector() Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 11/25] drm/connector: Add connector array functions

2018-04-14 Thread Noralf Trønnes
Add functions to deal with the registred connectors as an array: - drm_connector_get_all() - drm_connector_put_all() And to get the enabled status of those connectors: drm_connector_get_enabled_status() This is prep work to remove struct drm_fb_helper_connector. Signed-off-by: Noralf Trønnes

[RFC v4 18/25] drm/client: Make the display modes available to clients

2018-04-14 Thread Noralf Trønnes
Give clients easy access to the display modes. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 159 +-- include/drm/drm_client.h | 25 +++ 2 files changed, 148 insertions(+), 36 deletions(-) diff

[RFC v4 19/25] drm/client: Finish the in-kernel client API

2018-04-14 Thread Noralf Trønnes
The modesetting code is already present, this adds the rest of the API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 573 + drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm_drv.c

[RFC v4 16/25] drm: Make ioctls available for in-kernel clients

2018-04-14 Thread Noralf Trønnes
the debug name. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_crtc_internal.h | 18 ++--- drivers/gpu/drm/drm_dumb_buffers.c | 33 drivers/gpu/drm/drm_framebuffer.c | 50 - drivers/g

[RFC v4 09/25] drm/fb-helper: Move modeset commit code to drm_client

2018-04-14 Thread Noralf Trønnes
This moves the committing part of the modesetting code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c| 242 drivers/gpu/drm/drm_fb_helper.c | 216 +-- inclu

[RFC v4 06/25] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2018-04-14 Thread Noralf Trønnes
Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_at

[RFC v4 17/25] drm/client: Bail out if there's a DRM master

2018-04-14 Thread Noralf Trønnes
If there's a DRM master, return -EBUSY. Block userspace from becoming master by taking the master lock while the client is setting the mode. Suggested-by: Daniel Vetter <daniel.vet...@ffwll.ch> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_auth

[RFC v4 05/25] drm/fb-helper: dpms_legacy(): Only set on connectors in use

2018-04-14 Thread Noralf Trønnes
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions

[RFC v4 07/25] drm: Begin an API for in-kernel clients

2018-04-14 Thread Noralf Trønnes
This the beginning of an API for in-kernel clients. First out is a display representation that will be used by drm_fb_helper in order to move out its mode setting code. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_cl

[RFC v4 08/25] drm/fb-helper: Use struct drm_client_display

2018-04-14 Thread Noralf Trønnes
Prepare to move the modeset committing code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 161 include/drm/drm_fb_helper.h | 8 ++ 2 files changed, 89 insertions(+), 80 deletions(-)

[RFC v4 04/25] drm/fb-helper: Remove drm_fb_helper_debug_enter/leave()

2018-04-14 Thread Noralf Trønnes
lper_funcs->mode_set_base_atomic - Documentation/dev-tools/kgdb.rst Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 82 - 1 file changed, 82 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/dr

[RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-14 Thread Noralf Trønnes
buggy patch: (Chris Wilson) drm/prime: Clear drm_gem_object->dma_buf on release - Defer buffer creation until fb_open. David Herrmann (1): drm: provide management functions for drm_file Noralf Trønnes (24): drm/file: Don't set master on in-kernel clients drm/fb-helper: No need to ca

[RFC v4 02/25] drm/file: Don't set master on in-kernel clients

2018-04-14 Thread Noralf Trønnes
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch> --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/

[RFC v4 03/25] drm/fb-helper: No need to cache rotation and sw_rotations

2018-04-14 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede <hdego...@redhat.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_he

[RFC v4 01/25] drm: provide management functions for drm_file

2018-04-14 Thread Noralf Trønnes
e fops implementations and APIs (not that I am aware of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann <dh.herrm...@gmail.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <d

Re: [RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-13 Thread Noralf Trønnes
Argh, it didn't go through this time either. I'll just have to strip off recipients and just send to the lists when the cool off period is over. Sorry about the noise, I'll have to investigate this further. Noralf. Den 13.04.2018 18.53, skrev Noralf Trønnes: This patchset explores

[RFC v4 21/25] drm/fb-helper: Add drm_fb_helper_fb_open/release()

2018-04-13 Thread Noralf Trønnes
(fb_ops.owner) instead of the driver module. Fix that by ensuring that the driver module is pinned. The functions are not added to the DRM_FB_HELPER_DEFAULT_OPS() macro, because some of its users do set fb_open/release themselves. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drive

[RFC v4 13/25] drm/fb-helper: Remove struct drm_fb_helper_crtc

2018-04-13 Thread Noralf Trønnes
The stage is now set for a clean removal of drm_fb_helper_crtc. struct drm_client_display is doing its job now. Also remove the drm_fb_helper_funcs->initial_config which has been superseded by drm_driver->initial_client_display. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> ---

[RFC v4 17/25] drm/client: Bail out if there's a DRM master

2018-04-13 Thread Noralf Trønnes
If there's a DRM master, return -EBUSY. Block userspace from becoming master by taking the master lock while the client is setting the mode. Suggested-by: Daniel Vetter <daniel.vet...@ffwll.ch> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_auth

[RFC v4 14/25] drm/fb-helper: Remove struct drm_fb_helper_connector

2018-04-13 Thread Noralf Trønnes
No need to maintain a list of registered connectors. Just use the connector iterator. TODO: Remove: - drm_fb_helper_add_one_connector() - drm_fb_helper_single_add_all_connectors() - drm_fb_helper_remove_one_connector() Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 15/25] drm/fb-helper: Move modeset config code to drm_client

2018-04-13 Thread Noralf Trønnes
Call the function drm_client_find_display(). No functional change apart from making width/height arguments optional. Some function name/signature changes and whitespace adjustments. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c

[RFC v4 16/25] drm: Make ioctls available for in-kernel clients

2018-04-13 Thread Noralf Trønnes
the debug name. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_crtc_internal.h | 18 ++--- drivers/gpu/drm/drm_dumb_buffers.c | 33 drivers/gpu/drm/drm_framebuffer.c | 50 - drivers/g

[RFC v4 18/25] drm/client: Make the display modes available to clients

2018-04-13 Thread Noralf Trønnes
Give clients easy access to the display modes. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 159 +-- include/drm/drm_client.h | 25 +++ 2 files changed, 148 insertions(+), 36 deletions(-) diff

[RFC v4 20/25] drm/prime: Don't pin module on export for in-kernel clients

2018-04-13 Thread Noralf Trønnes
Avoid pinning the module when exporting a GEM object as a dmabuf. This makes it possible to unload drivers that has in-kernel clients using it. The client is removed on drm_dev_unregister() so no need to pin the driver. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 19/25] drm/client: Finish the in-kernel client API

2018-04-13 Thread Noralf Trønnes
The modesetting code is already present, this adds the rest of the API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 573 + drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm_drv.c

[RFC v4 12/25] drm/i915: Add drm_driver->initial_client_display callback

2018-04-13 Thread Noralf Trønnes
on out of intel_fbdev.c since it's not fbdev specific anymore. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c| 19 +-- drivers/gpu/drm/i915/i915_drv.c| 1 + drivers/gpu/drm/i915/intel_drv.h | 11 drivers/gpu/drm/i915/intel_f

[RFC v4 11/25] drm/connector: Add connector array functions

2018-04-13 Thread Noralf Trønnes
Add functions to deal with the registred connectors as an array: - drm_connector_get_all() - drm_connector_put_all() And to get the enabled status of those connectors: drm_connector_get_enabled_status() This is prep work to remove struct drm_fb_helper_connector. Signed-off-by: Noralf Trønnes

[RFC v4 10/25] drm/connector: Add drm_connector_has_preferred_mode/pick_cmdline_mode()

2018-04-13 Thread Noralf Trønnes
Move them over from drm_fb_helper since they are connector functions. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_connector.c| 94 ++ drivers/gpu/drm/drm_fb_helper.c| 75 ++ drivers/g

[RFC v4 09/25] drm/fb-helper: Move modeset commit code to drm_client

2018-04-13 Thread Noralf Trønnes
This moves the committing part of the modesetting code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c| 242 drivers/gpu/drm/drm_fb_helper.c | 216 +-- inclu

[RFC v4 06/25] drm/atomic: Move __drm_atomic_helper_disable_plane/set_config()

2018-04-13 Thread Noralf Trønnes
Prepare for moving drm_fb_helper modesetting code to drm_client. drm_client will be linked to drm.ko, so move __drm_atomic_helper_disable_plane() and __drm_atomic_helper_set_config() out of drm_kms_helper.ko. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_at

[RFC v4 04/25] drm/fb-helper: Remove drm_fb_helper_debug_enter/leave()

2018-04-13 Thread Noralf Trønnes
lper_funcs->mode_set_base_atomic - Documentation/dev-tools/kgdb.rst Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 82 - 1 file changed, 82 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/dr

[RFC v4 03/25] drm/fb-helper: No need to cache rotation and sw_rotations

2018-04-13 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede <hdego...@redhat.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_he

[RFC v4 08/25] drm/fb-helper: Use struct drm_client_display

2018-04-13 Thread Noralf Trønnes
Prepare to move the modeset committing code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 161 include/drm/drm_fb_helper.h | 8 ++ 2 files changed, 89 insertions(+), 80 deletions(-)

[RFC v4 07/25] drm: Begin an API for in-kernel clients

2018-04-13 Thread Noralf Trønnes
This the beginning of an API for in-kernel clients. First out is a display representation that will be used by drm_fb_helper in order to move out its mode setting code. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_cl

[RFC v4 05/25] drm/fb-helper: dpms_legacy(): Only set on connectors in use

2018-04-13 Thread Noralf Trønnes
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions

[RFC v4 02/25] drm/file: Don't set master on in-kernel clients

2018-04-13 Thread Noralf Trønnes
It only makes sense for userspace clients. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <daniel.vet...@ffwll.ch> --- drivers/gpu/drm/drm_file.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/

[RFC v4 01/25] drm: provide management functions for drm_file

2018-04-13 Thread Noralf Trønnes
e fops implementations and APIs (not that I am aware of any such plans), and more importantly from in-kernel use where no real file is available. Signed-off-by: David Herrmann <dh.herrm...@gmail.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> Reviewed-by: Daniel Vetter <d

[RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-13 Thread Noralf Trønnes
buggy patch: (Chris Wilson) drm/prime: Clear drm_gem_object->dma_buf on release - Defer buffer creation until fb_open. David Herrmann (1): drm: provide management functions for drm_file Noralf Trønnes (24): drm/file: Don't set master on in-kernel clients drm/fb-helper: No need to ca

Re: [RFC v4 00/25] drm: Add generic fbdev emulation

2018-04-12 Thread Noralf Trønnes
I hit a 'Sending rate exceeded' error with this patchset, so it didn't go out as it should. I will resend the patchset when I find out how to avoid this problem. Noralf. Den 12.04.2018 15.17, skrev Noralf Trønnes: This patchset explores the possibility of having generic fbdev emulation

[RFC v4 22/25] drm/fb-helper: Add generic fbdev emulation

2018-04-12 Thread Noralf Trønnes
This adds generic fbdev emulation for drivers that supports dumb buffers which they can export. All the driver has to do is call drm_fbdev_generic_setup(). Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c

[RFC v4 24/25] drm/client: Hack: Add bootsplash

2018-04-12 Thread Noralf Trønnes
A hack to test the client API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile| 1 + drivers/gpu/drm/client/Kconfig | 9 ++ drivers/gpu/drm/client/drm_bootsplash.c

[RFC v4 23/25] drm: Add DRM device registered notifier

2018-04-12 Thread Noralf Trønnes
Add a notifier that fires when a new DRM device is registered. This can be used by the bootsplash client to connect to all devices. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_drv.c | 32 include/drm/drm_drv.h | 4 2

[RFC v4 14/25] drm/fb-helper: Remove struct drm_fb_helper_connector

2018-04-12 Thread Noralf Trønnes
No need to maintain a list of registered connectors. Just use the connector iterator. TODO: Remove: - drm_fb_helper_add_one_connector() - drm_fb_helper_single_add_all_connectors() - drm_fb_helper_remove_one_connector() Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 21/25] drm/fb-helper: Add drm_fb_helper_fb_open/release()

2018-04-12 Thread Noralf Trønnes
(fb_ops.owner) instead of the driver module. Fix that by ensuring that the driver module is pinned. The functions are not added to the DRM_FB_HELPER_DEFAULT_OPS() macro, because some of its users do set fb_open/release themselves. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drive

[RFC v4 18/25] drm/client: Make the display modes available to clients

2018-04-12 Thread Noralf Trønnes
Give clients easy access to the display modes. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 159 +-- include/drm/drm_client.h | 25 +++ 2 files changed, 148 insertions(+), 36 deletions(-) diff

[RFC v4 16/25] drm: Make ioctls available for in-kernel clients

2018-04-12 Thread Noralf Trønnes
the debug name. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_crtc_internal.h | 18 ++--- drivers/gpu/drm/drm_dumb_buffers.c | 33 drivers/gpu/drm/drm_framebuffer.c | 50 - drivers/g

[RFC v4 19/25] drm/client: Finish the in-kernel client API

2018-04-12 Thread Noralf Trønnes
The modesetting code is already present, this adds the rest of the API. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c | 573 + drivers/gpu/drm/drm_debugfs.c | 7 + drivers/gpu/drm/drm_drv.c

[RFC v4 15/25] drm/fb-helper: Move modeset config code to drm_client

2018-04-12 Thread Noralf Trønnes
Call the function drm_client_find_display(). No functional change apart from making width/height arguments optional. Some function name/signature changes and whitespace adjustments. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c

[RFC v4 17/25] drm/client: Bail out if there's a DRM master

2018-04-12 Thread Noralf Trønnes
If there's a DRM master, return -EBUSY. Block userspace from becoming master by taking the master lock while the client is setting the mode. Suggested-by: Daniel Vetter <daniel.vet...@ffwll.ch> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_auth

[RFC v4 13/25] drm/fb-helper: Remove struct drm_fb_helper_crtc

2018-04-12 Thread Noralf Trønnes
The stage is now set for a clean removal of drm_fb_helper_crtc. struct drm_client_display is doing its job now. Also remove the drm_fb_helper_funcs->initial_config which has been superseded by drm_driver->initial_client_display. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> ---

[RFC v4 12/25] drm/i915: Add drm_driver->initial_client_display callback

2018-04-12 Thread Noralf Trønnes
on out of intel_fbdev.c since it's not fbdev specific anymore. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c| 19 +-- drivers/gpu/drm/i915/i915_drv.c| 1 + drivers/gpu/drm/i915/intel_drv.h | 11 drivers/gpu/drm/i915/intel_f

[RFC v4 20/25] drm/prime: Don't pin module on export for in-kernel clients

2018-04-12 Thread Noralf Trønnes
Avoid pinning the module when exporting a GEM object as a dmabuf. This makes it possible to unload drivers that has in-kernel clients using it. The client is removed on drm_dev_unregister() so no need to pin the driver. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/g

[RFC v4 11/25] drm/connector: Add connector array functions

2018-04-12 Thread Noralf Trønnes
Add functions to deal with the registred connectors as an array: - drm_connector_get_all() - drm_connector_put_all() And to get the enabled status of those connectors: drm_connector_get_enabled_status() This is prep work to remove struct drm_fb_helper_connector. Signed-off-by: Noralf Trønnes

[RFC v4 04/25] drm/fb-helper: Remove drm_fb_helper_debug_enter/leave()

2018-04-12 Thread Noralf Trønnes
lper_funcs->mode_set_base_atomic - Documentation/dev-tools/kgdb.rst Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 82 - 1 file changed, 82 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/dr

[RFC v4 10/25] drm/connector: Add drm_connector_has_preferred_mode/pick_cmdline_mode()

2018-04-12 Thread Noralf Trønnes
Move them over from drm_fb_helper since they are connector functions. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_connector.c| 94 ++ drivers/gpu/drm/drm_fb_helper.c| 75 ++ drivers/g

[RFC v4 09/25] drm/fb-helper: Move modeset commit code to drm_client

2018-04-12 Thread Noralf Trønnes
This moves the committing part of the modesetting code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_client.c| 242 drivers/gpu/drm/drm_fb_helper.c | 216 +-- inclu

[RFC v4 08/25] drm/fb-helper: Use struct drm_client_display

2018-04-12 Thread Noralf Trønnes
Prepare to move the modeset committing code to drm_client. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 161 include/drm/drm_fb_helper.h | 8 ++ 2 files changed, 89 insertions(+), 80 deletions(-)

[RFC v4 05/25] drm/fb-helper: dpms_legacy(): Only set on connectors in use

2018-04-12 Thread Noralf Trønnes
For each enabled crtc the functions sets dpms on all registered connectors. Limit this to only doing it once and on the connectors actually in use. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_helper.c | 11 +-- 1 file changed, 5 insertions

[RFC v4 07/25] drm: Begin an API for in-kernel clients

2018-04-12 Thread Noralf Trønnes
This the beginning of an API for in-kernel clients. First out is a display representation that will be used by drm_fb_helper in order to move out its mode setting code. Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_cl

[RFC v4 03/25] drm/fb-helper: No need to cache rotation and sw_rotations

2018-04-12 Thread Noralf Trønnes
Getting rotation info is cheap so we can do it on demand. This is done in preparation for the removal of struct drm_fb_helper_crtc. Cc: Hans de Goede <hdego...@redhat.com> Signed-off-by: Noralf Trønnes <nor...@tronnes.org> --- drivers/gpu/drm/drm_fb_he

<    3   4   5   6   7   8   9   10   11   12   >