[PATCH 3/6] drm/amd: Use drm_dev_unregister()

2019-02-03 Thread Noralf Trønnes
drm_dev_unplug() has been stripped down and is going away. Open code its 2 remaining function calls. Cc: Alex Deucher Cc: Christian König Cc: David (ChunMing) Zhou Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH 6/6] drm/drv: Remove drm_dev_unplug()

2019-02-03 Thread Noralf Trønnes
There are no users left. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_drv.c | 17 - include/drm/drm_drv.h | 1 - 2 files changed, 18 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index e0941200edc6..87210d4a9e53 100644

[PATCH 2/6] drm/drv: Prepare to remove drm_dev_unplug()

2019-02-03 Thread Noralf Trønnes
The only thing now that makes drm_dev_unplug() special is that it sets drm_device->unplugged. Move this code to drm_dev_unregister() so that we can remove drm_dev_unplug(). Signed-off-by: Noralf Trønnes --- Maybe s/unplugged/unregistered/ ? I looked at drm_device->registered, but

[PATCH 1/6] drm: Fix drm_release() and device unplug

2019-02-03 Thread Noralf Trønnes
both sides are done with drm_device, it is released. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_drv.c | 6 +- drivers/gpu/drm/drm_file.c | 6 ++ 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index

[PATCH 0/6] drm/drv: Remove drm_dev_unplug()

2019-02-03 Thread Noralf Trønnes
drm_dev_unregister() situation. Noralf. Noralf Trønnes (6): drm: Fix drm_release() and device unplug drm/drv: Prepare to remove drm_dev_unplug() drm/amd: Use drm_dev_unregister() drm/udl: Use drm_dev_unregister() drm/xen: Use drm_dev_unregister() drm/drv: Remove drm_dev_unplug() drivers

[PATCH 4/6] drm/udl: Use drm_dev_unregister()

2019-02-03 Thread Noralf Trønnes
drm_dev_unplug() has been stripped down and is going away. Open code its 2 remaining function calls. Cc: Dave Airlie Cc: Sean Paul Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/udl/udl_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/udl

Re: [PATCH] drm/rockchip: Use drm_fbdev_generic_setup()

2019-02-02 Thread Noralf Trønnes
up() call is put after drm_dev_register() in the > driver. This is done to highlight the fact that fbdev emulation is an > internal client that makes use of the driver, it is not part of the > driver as such. If fbdev setup fails, an error is printed, but the driver > succeeds probing. > > Cc

Re: [PATCH v2 4/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d()

2019-02-01 Thread Noralf Trønnes
Den 01.02.2019 09.01, skrev Gerd Hoffmann: > On Thu, Jan 31, 2019 at 11:47:38AM +0100, Noralf Trønnes wrote: >> >> >> Den 30.01.2019 10.43, skrev Gerd Hoffmann: >>> Add 3d resource parameters to virtio_gpu_object_params struct. Wit

Re: [PATCH v2 6/6] drm/virtio: move virtio_gpu_cmd_create_resource call into virtio_gpu_object_create

2019-01-31 Thread Noralf Trønnes
With that in place virtio_gpu_object_attach() will never be called with > an object which is not yet created, so the extra > virtio_gpu_object_attach() calls done after > virtio_gpu_cmd_create_resource() is not needed any more. > > Signed-off-by: Gerd Hoffmann

Re: [PATCH v2 5/6] drm/virtio: drop fencing in virtio_gpu_resource_create_ioctl

2019-01-31 Thread Noralf Trønnes
re is no need to wait for completion too. Which > btw is different from resource destroy, where we have to make sure the > host has seen the destroy and thus doesn't use it any more before > releasing the pages backing the resource. > > Signed-off-by: Gerd Hoffm

Re: [PATCH v2 4/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource_3d()

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Add 3d resource parameters to virtio_gpu_object_params struct. With > that in place we can use it for virtio_gpu_cmd_resource_create_3d() > calls. > > Signed-off-by: Gerd Hoffmann > --- You don't remove the struct virtio_gpu_resource_create_3d

Re: [PATCH v2 2/6] drm/virtio: use struct to pass params to virtio_gpu_object_create()

2019-01-31 Thread Noralf Trønnes
params = { 0 }; > int ret; > uint32_t pitch; > uint32_t format; > @@ -96,7 +97,9 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, > args->size = pitch * args->height; > args->size = ALIGN(args->size, PAGE_SIZE)

Re: [PATCH v2 3/6] drm/virtio: params struct for virtio_gpu_cmd_create_resource()

2019-01-31 Thread Noralf Trønnes
Den 30.01.2019 10.43, skrev Gerd Hoffmann: > Add format, width and height fields to the virtio_gpu_object_params > struct. With that in place we can use the parameter struct for > virtio_gpu_cmd_create_resource() calls too. > > Signed-off-by: Gerd Hoffmann > --- Acked-

Re: [PATCH v2 1/6] drm/virtio: move virtio_gpu_object_{attach, detach} calls.

2019-01-31 Thread Noralf Trønnes
e calls from the > move_notify() callback. > > With that in place the move and move_notify callbacks are not > needed any more, so drop them. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-

Re: devm actions and hw clenaup (was Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register)

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 17.50, skrev Daniel Vetter: > On Tue, Jan 29, 2019 at 03:34:46PM +0100, Noralf Trønnes wrote: >> >> >> Den 24.01.2019 18.57, skrev Daniel Vetter: >>> On Thu, Jan 24, 2019 at 6:46 PM Greg KH wrote: >>>> >>>> On Thu,

Re: [PATCH] drm/doc: Task to rename CMA helpers

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 14.21, skrev Daniel Vetter: > I'm kinda fed up explaining why the have a confusing name :-) > > Cc: Noralf Trønnes > Cc: Laurent Pinchart > Signed-off-by: Daniel Vetter > --- I agree that it's confusing, Acked-by: Noralf Trønnes I would also

Re: devm actions and hw clenaup (was Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register)

2019-01-29 Thread Noralf Trønnes
Den 24.01.2019 18.57, skrev Daniel Vetter: > On Thu, Jan 24, 2019 at 6:46 PM Greg KH wrote: >> >> On Thu, Jan 24, 2019 at 11:43:12AM +0100, Daniel Vetter wrote: >>> On Wed, Jan 23, 2019 at 11:54:07AM +0100, Noralf Trønnes wrote: >>>> >>>>

Re: [PATCH] drm/doc: Add a warning to drm_dev_is_unplugged

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 11.20, skrev Noralf Trønnes: > > > Den 29.01.2019 10.51, skrev Daniel Vetter: >> On Tue, Jan 29, 2019 at 10:02:32AM +0100, Noralf Trønnes wrote: >>> >>> >>> Den 29.01.2019 09.56, skrev Daniel Vetter: >>>> It's probably

Re: [PATCH] drm/fb-helper: generic: Fix drm_fbdev_client_restore()

2019-01-29 Thread Noralf Trønnes
Den 28.01.2019 12.49, skrev Gerd Hoffmann: > On Mon, Jan 28, 2019 at 11:25:28AM +0100, Noralf Trønnes wrote: >> >> >> Den 28.01.2019 07.48, skrev Gerd Hoffmann: >>>> Fix by using drm_fb_helper_lastclose() which checks if fbdev is in use. >>> >&g

Re: [PATCH] drm/doc: Add a warning to drm_dev_is_unplugged

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 10.51, skrev Daniel Vetter: > On Tue, Jan 29, 2019 at 10:02:32AM +0100, Noralf Trønnes wrote: >> >> >> Den 29.01.2019 09.56, skrev Daniel Vetter: >>> It's probably not what you want, definitely not after Noralf's work to >>> add drm_dev

Re: [PATCH] drm/doc: Add a warning to drm_dev_is_unplugged

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 09.56, skrev Daniel Vetter: > It's probably not what you want, definitely not after Noralf's work to > add drm_dev_enter/exit. > > Cc: Noralf Trønnes > Signed-off-by: Daniel Vetter > --- Reviewed-by: Noralf Trønnes > include/drm/drm_drv.h | 4

Re: [PATCH v2] drm/qxl: use ttm_tt

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 09.25, skrev Gerd Hoffmann: > qxl device will not dma, so we don't need ttm_dma_tt. Go use ttm_tt > instead, to avoid wasting resources (swiotlb bounce buffers for > example). > > Signed-off-by: Gerd Hoffmann > --- Acked-

Re: [Intel-gfx] [PATCH v5 4/5] drm: Add library for shmem backed GEM objects

2019-01-29 Thread Noralf Trønnes
Den 29.01.2019 01.19, skrev Eric Anholt: > Noralf Trønnes writes: > >> Den 28.01.2019 21.57, skrev Rob Herring: >>> On Sun, Dec 2, 2018 at 9:59 AM Noralf Trønnes wrote: >>>> >>>> >>>> Den 30.11.2018 00.58, skrev Eric Anholt: >>>

Re: [Intel-gfx] [PATCH v5 4/5] drm: Add library for shmem backed GEM objects

2019-01-28 Thread Noralf Trønnes
Den 28.01.2019 21.57, skrev Rob Herring: > On Sun, Dec 2, 2018 at 9:59 AM Noralf Trønnes wrote: >> >> >> Den 30.11.2018 00.58, skrev Eric Anholt: >>> Daniel Vetter writes: >>> >>>> On Wed, Nov 28, 2018 at 01:52:56PM -0800, Eric Anholt wrot

Re: [PATCH 04/11] drm/tinydrm: Remove tinydrm_display_pipe_init()

2019-01-28 Thread Noralf Trønnes
Den 21.01.2019 10.15, skrev Daniel Vetter: > On Sun, Jan 20, 2019 at 12:43:11PM +0100, Noralf Trønnes wrote: >> Further strip down tinydrm.ko and switch to drm_simple_connector_create(). >> >> Signed-off-by: Noralf Trønnes >> --- >> Documentation/gp

Re: [PATCH 11/11] drm/fb-helper: generic: Don't take module ref for fbcon

2019-01-28 Thread Noralf Trønnes
Den 21.01.2019 10.05, skrev Daniel Vetter: > On Sun, Jan 20, 2019 at 12:43:18PM +0100, Noralf Trønnes wrote: >> It's now safe to let fbcon unbind automatically on fbdev unregister. >> The crash problem was fixed in commit 2122b40580dd >> ("fbdev: fbcon: Fix unregiste

Re: [PATCH v3 17/23] drm/qxl: use generic fbdev emulation

2019-01-28 Thread Noralf Trønnes
Den 28.01.2019 09.59, skrev Gerd Hoffmann: > On Fri, Jan 25, 2019 at 06:25:27PM +0100, Noralf Trønnes wrote: >> >> >> Den 18.01.2019 13.20, skrev Gerd Hoffmann: >>> Switch qxl over to the new generic fbdev emulation. >>> >>> Signed-off-by:

Re: [PATCH v3 10/23] drm/qxl: move qxl_primary_apply_cursor to correct place

2019-01-28 Thread Noralf Trønnes
e the > commit message with that. > This is actually my first review of a driver that I'm not familiar with. I'm not quite sure how much in depth understanding that is required to put my ack on it. Going further into the patchset I realised that there's no way that I can

Re: [PATCH] drm/fb-helper: generic: Fix drm_fbdev_client_restore()

2019-01-28 Thread Noralf Trønnes
Den 28.01.2019 07.48, skrev Gerd Hoffmann: >> Fix by using drm_fb_helper_lastclose() which checks if fbdev is in use. > >> static int drm_fbdev_client_restore(struct drm_client_dev *client) >> { >> -struct drm_fb_helper *fb_helper = drm_fb_helper_from_client(client); >> - >> -

Re: [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Noralf Trønnes
t; drivers/gpu/drm/qxl/qxl_draw.c | 232 --- >>> drivers/gpu/drm/qxl/qxl_fb.c | 300 >>> - >>> drivers/gpu/drm/qxl/Makefile | 2 +- >>> 4 files changed, 1 insertion(+), 554 deletions(-) >>> delete mode 100644

Re: [PATCH v3 22/23] drm/qxl: use kernel mode db

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add all standard modes from the kernel's video mode data base. > Keep a few non-standard modes in the qxl mode list. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dr

Re: [PATCH v3 21/23] drm/qxl: add qxl_add_mode helper function

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Add a helper function to add custom video modes to a connector. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedeskt

Re: [PATCH v3 20/23] drm/qxl: add mode/framebuffer check functions

2019-01-25 Thread Noralf Trønnes
are too big will not be added to the mode list in the first place. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 19/23] drm/qxl: implement qxl_gem_prime_(un)pin

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 18/23] drm/qxl: remove dead qxl fbdev emulation code

2019-01-25 Thread Noralf Trønnes
--- > drivers/gpu/drm/qxl/Makefile | 2 +- > 4 files changed, 1 insertion(+), 554 deletions(-) > delete mode 100644 drivers/gpu/drm/qxl/qxl_fb.c > Nice! Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists

Re: [PATCH v3 17/23] drm/qxl: use generic fbdev emulation

2019-01-25 Thread Noralf Trønnes
goto modeset_cleanup; > > + drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "qxl"); I couldn't find that this was part of old fbdev code, so it would be nice to mention it in the commit message. Acked-by: Noralf Trønnes > + drm_fbdev_generi

Re: [PATCH v3 16/23] drm/qxl: implement prime kmap/kunmap

2019-01-25 Thread Noralf Trønnes
is balanced. > > Signed-off-by: Gerd Hoffmann > --- Just a note: You catch the one-to-many kmap type of unbalance, but not the one-too-many kunmap situation. Acked-by: Noralf Trønnes > drivers/gpu/drm/qxl/qxl_drv.h| 1 + > drivers/gpu/drm/qxl/qxl_object.c | 6 ++ > d

Re: [PATCH v3 15/23] drm/qxl: use qxl_num_crtc directly

2019-01-25 Thread Noralf Trønnes
eed to dereference pointers each time it > needs the value, and when reading the code you don't have to trace where > and why qdev->monitors_config->max_allowed is set. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes _

Re: [PATCH v3 14/23] drm/qxl: cover all crtcs in shadow bo.

2019-01-25 Thread Noralf Trønnes
user_bo->shadow->surf = user_bo->surf; > + if (user_bo->shadow != qdev->dumb_shadow_bo) { > + if (user_bo->shadow) { > + drm_gem_object_put_unlocked > + (_bo->shadow

Re: [PATCH v3 13/23] drm/qxl: use shadow bo directly

2019-01-25 Thread Noralf Trønnes
pot anything suspicious looking. Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 12/23] drm/qxl: track primary bo

2019-01-25 Thread Noralf Trønnes
_io_create_primary(). > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 11/23] drm/qxl: drop unused offset parameter from qxl_io_create_primary()

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 10/23] drm/qxl: move qxl_primary_apply_cursor to correct place

2019-01-25 Thread Noralf Trønnes
condition, but the condition for applying the cursor is changed from bo_old->is_primary to !bo->is_primary. It probably makes sense to someone that knows the driver. Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 09/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for dumb gem objects

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > dumb buffers are used as qxl surfaces, so allocate them as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-

Re: [PATCH v3 08/23] drm/qxl: use QXL_GEM_DOMAIN_SURFACE for shadow bo.

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > The shadow bo is used as qxl surface, so allocate it as > QXL_GEM_DOMAIN_SURFACE. Should usually be allocated in > PRIV ttm domain then, so this reduces VRAM memory pressure. > > Signed-off-by: Gerd Hoffmann > --- Acked-

Re: [PATCH v3 07/23] drm/qxl: allow both PRIV and VRAM placement for QXL_GEM_DOMAIN_SURFACE

2019-01-25 Thread Noralf Trønnes
s which must be allocated there. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 06/23] drm/qxl: use separate offset spaces for the two slots / ttm memory types.

2019-01-25 Thread Noralf Trønnes
s are rare enough by pure luck. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 05/23] drm/qxl: drop unused fields from struct qxl_device

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > slot_id_bits and slot_gen_bits can be read directly from qxlrom instead. > va_slot_mask is never used anywhere. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-dev

Re: [PATCH v3 04/23] drm/qxl: change the way slot is detected

2019-01-25 Thread Noralf Trønnes
adapted to upstream changes ] > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 03/23] drm/qxl: simplify slot management

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.20, skrev Gerd Hoffmann: > Drop pointless indirection, remove the mem_slots array and index > variables, drop dynamic allocation. Store memslots in qxl_device > instead. > > Signed-off-by: Gerd Hoffmann > --- Looks sane: Acked-

Re: [PATCH v3 02/23] drm/qxl: drop unused qxl_fb_virtual_address

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v3 01/23] drm/qxl: drop ttm_mem_reg arg from qxl_hw_surface_alloc()

2019-01-25 Thread Noralf Trønnes
Den 18.01.2019 13.19, skrev Gerd Hoffmann: > Not used, is always NULL. > > Signed-off-by: Gerd Hoffmann > --- Acked-by: Noralf Trønnes ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/

[PATCH] drm/fb-helper: generic: Fix drm_fbdev_client_restore()

2019-01-25 Thread Noralf Trønnes
elper: Finish the generic fbdev emulation") Cc: sta...@vger.kernel.org Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 31fcf94bf825..c5

Re: [PATCH 03/11] drm/simple-kms-helper: Add drm_simple_connector_create()

2019-01-25 Thread Noralf Trønnes
Den 24.01.2019 15.53, skrev Hans de Goede: > Hi, > > On 24-01-19 15:38, Noralf Trønnes wrote: >> [cc:Hans] >> >> Den 21.01.2019 10.22, skrev Daniel Vetter: >>> On Sun, Jan 20, 2019 at 12:43:10PM +0100, Noralf Trønnes wrote: >>>> This adds a functi

Re: [PATCH 04/26] drm/fb-helper: Add fill_info() functions

2019-01-25 Thread Noralf Trønnes
Den 25.01.2019 09.48, skrev Daniel Vetter: > On Thu, Jan 24, 2019 at 06:40:52PM +0100, Noralf Trønnes wrote: >> >> >> Den 24.01.2019 17.58, skrev Daniel Vetter: >>> The fbdev split between fix and var information is kinda >>> pointless for drm drive

Re: [PATCH 04/26] drm/fb-helper: Add fill_info() functions

2019-01-24 Thread Noralf Trønnes
Den 24.01.2019 17.58, skrev Daniel Vetter: > The fbdev split between fix and var information is kinda > pointless for drm drivers since everything is fixed: The fbdev > emulation doesn't support changing modes at all. > > Create a new simplified helper and use it in the generic fbdev > helper

Re: [PATCH 03/11] drm/simple-kms-helper: Add drm_simple_connector_create()

2019-01-24 Thread Noralf Trønnes
[cc:Hans] Den 21.01.2019 10.22, skrev Daniel Vetter: > On Sun, Jan 20, 2019 at 12:43:10PM +0100, Noralf Trønnes wrote: >> This adds a function that creates a simple connector that has only one >> static mode. Additionally add a helper to set _mode_config width >> and height

Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register

2019-01-23 Thread Noralf Trønnes
Den 22.01.2019 20.30, skrev Daniel Vetter: > On Tue, Jan 22, 2019 at 8:07 PM Noralf Trønnes wrote: >> >> >> >> Den 22.01.2019 10.32, skrev Daniel Vetter: >>> On Mon, Jan 21, 2019 at 01:21:46PM +0100, Noralf Trønnes wrote: >>>> >>>>

Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register

2019-01-22 Thread Noralf Trønnes
Den 22.01.2019 10.32, skrev Daniel Vetter: > On Mon, Jan 21, 2019 at 01:21:46PM +0100, Noralf Trønnes wrote: >> >> >> Den 21.01.2019 10.55, skrev Daniel Vetter: >>> On Mon, Jan 21, 2019 at 10:10:14AM +0100, Daniel Vetter wrote: >>>> On Sun, Jan 20, 2019

Re: [PATCH 09/11] drm/tinydrm: Remove tinydrm_device

2019-01-21 Thread Noralf Trønnes
Den 21.01.2019 10.29, skrev Daniel Vetter: > On Sun, Jan 20, 2019 at 12:43:16PM +0100, Noralf Trønnes wrote: >> No more users left so it can go alongside its helpers. >> Update the tinydrm docs description and remove todo entry. >> >> Signed-off-by: Noralf Trønnes &

Re: [PATCH 00/11] drm/tinydrm: Remove tinydrm_device

2019-01-21 Thread Noralf Trønnes
Den 21.01.2019 09.34, skrev Sam Ravnborg: > Hi Noralf. > > On Sun, Jan 20, 2019 at 12:43:07PM +0100, Noralf Trønnes wrote: >> This patchset is part of the effort to remove tinydrm.ko. It removes >> struct tinydrm_device and tinydrm.h. >> >> While doin

Re: [PATCH 07/11] drm/tinydrm/repaper: Use devm_drm_dev_*()

2019-01-21 Thread Noralf Trønnes
Den 20.01.2019 23.25, skrev Sam Ravnborg: > On Sun, Jan 20, 2019 at 11:22:36PM +0100, Sam Ravnborg wrote: >> Hi Noralf. >> >> On Sun, Jan 20, 2019 at 12:43:14PM +0100, Noralf Trønnes wrote: >>> Use devm_drm_dev_init(), devm_drm_dev_register_with_fbdev() and

Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register

2019-01-21 Thread Noralf Trønnes
Den 21.01.2019 07.11, skrev Sam Ravnborg: > Hi Noralf. > > On Sun, Jan 20, 2019 at 12:43:08PM +0100, Noralf Trønnes wrote: >> This adds resource managed (devres) versions of drm_dev_init() and >> drm_dev_register(). >> >> Also added is devm_drm_dev_register_w

Re: [PATCH 01/11] drm: Add devm_drm_dev_init/register

2019-01-21 Thread Noralf Trønnes
Den 21.01.2019 10.55, skrev Daniel Vetter: > On Mon, Jan 21, 2019 at 10:10:14AM +0100, Daniel Vetter wrote: >> On Sun, Jan 20, 2019 at 12:43:08PM +0100, Noralf Trønnes wrote: >>> This adds resource managed (devres) versions of drm_dev_init() and >>> drm_dev_reg

Re: [PATCH 02/11] drm/modes: Add DRM_SIMPLE_MODE()

2019-01-20 Thread Noralf Trønnes
Den 20.01.2019 17.37, skrev Ilia Mirkin: > You don't appear to set the mm in the new macro. Not sure if it's on > purpose. > Not intentional, that was a slip. I copied the DRM_MODE macro and forgot about setting the size. Thanks, Noralf. > On Sun, Jan 20, 2019, 06:43 No

[PATCH 10/11] drm/tinydrm: Use drm_dev_enter/exit()

2019-01-20 Thread Noralf Trønnes
. - The device is removed (Device Tree overlay unloading). This can happen at any time. - The driver sysfs unbind file can be used to unbind the driver from the device. This can happen any time. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/hx8357d.c | 9 +-- drivers/gpu/drm

[PATCH 05/11] drm/tinydrm/mipi-dbi: Add drm_to_mipi_dbi()

2019-01-20 Thread Noralf Trønnes
Add a function to derive mipi_dbi from drm_device now that tinydrm_device is going away. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/hx8357d.c | 3 +-- drivers/gpu/drm/tinydrm/ili9225.c | 11 --- drivers/gpu/drm/tinydrm/ili9341.c | 3 +-- drivers/gpu/drm/tinydrm

[PATCH 11/11] drm/fb-helper: generic: Don't take module ref for fbcon

2019-01-20 Thread Noralf Trønnes
It's now safe to let fbcon unbind automatically on fbdev unregister. The crash problem was fixed in commit 2122b40580dd ("fbdev: fbcon: Fix unregister crash when more than one framebuffer") Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_fb_helper.c | 6 -- 1 file

[PATCH 06/11] drm/tinydrm: Remove tinydrm_shutdown()

2019-01-20 Thread Noralf Trønnes
It's just a wrapper around drm_atomic_helper_shutdown() now. Also store drm_device in the drvdata field, since that's what's used. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 14 -- drivers/gpu/drm/tinydrm/hx8357d.c | 7 +++ drivers

[PATCH 07/11] drm/tinydrm/repaper: Use devm_drm_dev_*()

2019-01-20 Thread Noralf Trønnes
Use devm_drm_dev_init(), devm_drm_dev_register_with_fbdev() and drop using tinydrm_device. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/repaper.c | 63 --- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/repaper.c

[PATCH 04/11] drm/tinydrm: Remove tinydrm_display_pipe_init()

2019-01-20 Thread Noralf Trønnes
Further strip down tinydrm.ko and switch to drm_simple_connector_create(). Signed-off-by: Noralf Trønnes --- Documentation/gpu/tinydrm.rst | 3 - drivers/gpu/drm/tinydrm/core/Makefile | 2 +- drivers/gpu/drm/tinydrm/core/tinydrm-pipe.c | 183 drivers

[PATCH 08/11] drm/tinydrm: Use devm_drm_dev_*()

2019-01-20 Thread Noralf Trønnes
Use devm_drm_dev_init(), devm_drm_dev_register_with_fbdev() and drop using tinydrm_device. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/hx8357d.c | 25 +-- drivers/gpu/drm/tinydrm/ili9225.c | 25 +-- drivers/gpu/drm/tinydrm/ili9341.c | 25 +-- drivers/gpu/drm

[PATCH 02/11] drm/modes: Add DRM_SIMPLE_MODE()

2019-01-20 Thread Noralf Trønnes
This adds a helper macro to specify modes that only contain info about resolution. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/tinydrm/hx8357d.c | 2 +- drivers/gpu/drm/tinydrm/ili9225.c | 2 +- drivers/gpu/drm/tinydrm/ili9341.c | 2 +- drivers/gpu/drm/tinydrm/mi0283qt.c | 2

[PATCH 01/11] drm: Add devm_drm_dev_init/register

2019-01-20 Thread Noralf Trønnes
This adds resource managed (devres) versions of drm_dev_init() and drm_dev_register(). Also added is devm_drm_dev_register_with_fbdev() which sets up generic fbdev emulation as well. devm_drm_dev_register() isn't exported since there are no users. Signed-off-by: Noralf Trønnes

[PATCH 09/11] drm/tinydrm: Remove tinydrm_device

2019-01-20 Thread Noralf Trønnes
No more users left so it can go alongside its helpers. Update the tinydrm docs description and remove todo entry. Signed-off-by: Noralf Trønnes --- Documentation/gpu/tinydrm.rst | 26 +-- Documentation/gpu/todo.rst| 4 - drivers/gpu/drm/tinydrm/core

[PATCH 00/11] drm/tinydrm: Remove tinydrm_device

2019-01-20 Thread Noralf Trønnes
and bound fbcon. Noralf. Noralf Trønnes (11): drm: Add devm_drm_dev_init/register drm/modes: Add DRM_SIMPLE_MODE() drm/simple-kms-helper: Add drm_simple_connector_create() drm/tinydrm: Remove tinydrm_display_pipe_init() drm/tinydrm/mipi-dbi: Add drm_to_mipi_dbi() drm/tinydrm: Remove

[PATCH 03/11] drm/simple-kms-helper: Add drm_simple_connector_create()

2019-01-20 Thread Noralf Trønnes
This adds a function that creates a simple connector that has only one static mode. Additionally add a helper to set _mode_config width and height from the static mode. Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/drm_simple_kms_helper.c | 122 include/drm

Re: [PATCH v3 0/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-17 Thread Noralf Trønnes
Den 15.01.2019 05.36, skrev Noralf Trønnes: > David discovered a bug which gave memory corruption because the tx_buf > was written past its end for st7586 which has a smaller tx_buf. The > problem was that mipi_dbi_enable_flush() now calls directly into > mipi_dbi_fb_dirty() instead

Re: [PATCH v3] drm/cma-helper: Remove unused fbdev code

2019-01-17 Thread Noralf Trønnes
Den 14.01.2019 13.10, skrev Noralf Trønnes: > CMA helper drivers have been converted to drm_fbdev_generic_setup() > so the fbdev code can be removed. > > v3: Remove CMA specific conditional in the generic fbdev client > > v2: Clean up the includes some more (Laurent) > &

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 15.01.2019 05.38, skrev Noralf Trønnes: > > > Den 15.01.2019 00.26, skrev David Lechner: >> On 1/14/19 4:53 PM, Noralf Trønnes wrote: >>> >>> >>> Den 14.01.2019 23.33, skrev David Lechner: >>>> On 1/14/19 3:50 PM, David Lechner

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 15.01.2019 00.26, skrev David Lechner: > On 1/14/19 4:53 PM, Noralf Trønnes wrote: >> >> >> Den 14.01.2019 23.33, skrev David Lechner: >>> On 1/14/19 3:50 PM, David Lechner wrote: >>>> On 1/14/19 10:13 AM, Noralf Trønnes wrote: >&

[PATCH v3 0/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
: - Include vblank header (Sam) - ili9225 and st7586 can't use mipi_dbi_enable_flush() (David) Noralf. Noralf Trønnes (5): drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() drm/damage-helper: Add drm_atomic_helper_damage_merged() drm/tinydrm: Use struct drm_rect drm/tinydrm: Use damage helper

[PATCH v3 1/5] drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty()

2019-01-14 Thread Noralf Trønnes
This adds a .fb_create helper that sets the .dirty callback to drm_atomic_helper_dirtyfb(). v2: Improve docs (Daniel) Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 50 +--- include/drm

[PATCH v3 2/5] drm/damage-helper: Add drm_atomic_helper_damage_merged()

2019-01-14 Thread Noralf Trønnes
Useful for drivers that only care about the combined damage. v2: Remove unnecessary clearing of damage clips Cc: Deepak Rawat Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/drm_damage_helper.c | 41 + include

[PATCH v3 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
it. v3: Include vblank header (Sam) ili9225 and st7586 can't use mipi_dbi_enable_flush() (David) v2: Remove fb check in mipi_dbi_enable_flush() it can't be NULL (kbuild test robot) Cc: David Lechner Cc: Eric Anholt Signed-off-by: Noralf Trønnes Acked-by: Daniel Vetter Reviewed

[PATCH v3 5/5] drm/todo: Tick off some tinydrm entries

2019-01-14 Thread Noralf Trønnes
by drm_gem_fb_create_with_dirty() Cc: Sam Ravnborg Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg --- Documentation/gpu/todo.rst | 35 --- 1 file changed, 35 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index

[PATCH v3 3/5] drm/tinydrm: Use struct drm_rect

2019-01-14 Thread Noralf Trønnes
-by: Noralf Trønnes Acked-by: Daniel Vetter Reviewed-by: Sam Ravnborg --- .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 19 drivers/gpu/drm/tinydrm/ili9225.c | 43 ++- drivers/gpu/drm/tinydrm/mipi-dbi.c| 21 - drivers/gpu/drm/tinydrm

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 15.01.2019 00.03, skrev David Lechner: > On 1/14/19 4:43 PM, Noralf Trønnes wrote: >> >> >> Den 14.01.2019 23.33, skrev David Lechner: >>> On 1/14/19 3:50 PM, David Lechner wrote: >>>> On 1/14/19 10:13 AM, Noralf Trønnes wrote: >&

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 14.01.2019 23.33, skrev David Lechner: > On 1/14/19 3:50 PM, David Lechner wrote: >> On 1/14/19 10:13 AM, Noralf Trønnes wrote: >>> >>> I see that you have this call chain: >>> st7586_pipe_enable() -> mipi_dbi_enable_flush() -> mipi_dbi_fb_dirty().

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 14.01.2019 23.06, skrev David Lechner: > On 1/11/19 2:12 PM, Noralf Trønnes wrote: >> This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty >> handler. All flushing will now happen in the pipe functions. >> >> Also enable the damage plane property f

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 14.01.2019 23.33, skrev David Lechner: > On 1/14/19 3:50 PM, David Lechner wrote: >> On 1/14/19 10:13 AM, Noralf Trønnes wrote: >>> >>> I see that you have this call chain: >>> st7586_pipe_enable() -> mipi_dbi_enable_flush() -> mipi_dbi_fb_dirty().

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 14.01.2019 16.00, skrev Noralf Trønnes: > > > Den 14.01.2019 03.15, skrev David Lechner: >> On 1/13/19 3:19 PM, David Lechner wrote: >>> On 1/11/19 2:12 PM, Noralf Trønnes wrote: >>>> This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty

Re: [PATCH v2 4/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-14 Thread Noralf Trønnes
Den 14.01.2019 03.15, skrev David Lechner: > On 1/13/19 3:19 PM, David Lechner wrote: >> On 1/11/19 2:12 PM, Noralf Trønnes wrote: >>> This switches to drm_atomic_helper_dirtyfb() as the framebuffer dirty >>> handler. All flushing will now happen in the pipe fun

[PATCH v3] drm/cma-helper: Remove unused fbdev code

2019-01-14 Thread Noralf Trønnes
CMA helper drivers have been converted to drm_fbdev_generic_setup() so the fbdev code can be removed. v3: Remove CMA specific conditional in the generic fbdev client v2: Clean up the includes some more (Laurent) Cc: Laurent Pinchart Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg

Re: [PATCH v3 2/5] drm/mxsfb: Use drm_fbdev_generic_setup()

2019-01-14 Thread Noralf Trønnes
Den 28.11.2018 22.27, skrev Noralf Trønnes: > The CMA helper is already using the drm_fb_helper_generic_probe part of > the generic fbdev emulation. This patch makes full use of the generic > fbdev emulation by using its drm_client callbacks. This means that > drm_mode_

Re: [PATCH v3 1/5] drm/hisilicon/kirin: Use drm_fbdev_generic_setup()

2019-01-14 Thread Noralf Trønnes
Den 28.11.2018 22.27, skrev Noralf Trønnes: > The CMA helper is already using the drm_fb_helper_generic_probe part of > the generic fbdev emulation. This patch makes full use of the generic > fbdev emulation by using its drm_client callbacks. This means that > drm_mode_

Re: [PATCH V7 2/2] drm/panel: Add Sitronix ST7701 panel driver

2019-01-11 Thread Noralf Trønnes
Den 11.01.2019 22.19, skrev Sam Ravnborg: > Hi Jagan. > > Gave this another more detailed read - triggered some additional comments. > Depite the comments it looks good, and this is all more or > less cosmetic improvements. > > Sam > >> +struct st7701_panel_desc { >> +const struct

[PATCH v2 0/5] drm/tinydrm: Use damage helper for dirtyfb

2019-01-11 Thread Noralf Trønnes
in drm-misc-next. Noralf. Noralf Trønnes (5): drm/gem-fb-helper: Add drm_gem_fb_create_with_dirty() drm/damage-helper: Add drm_atomic_helper_damage_merged() drm/tinydrm: Use struct drm_rect drm/tinydrm: Use damage helper for dirtyfb drm/todo: Tick off some tinydrm entries Documentation/gpu

[PATCH v2 2/5] drm/damage-helper: Add drm_atomic_helper_damage_merged()

2019-01-11 Thread Noralf Trønnes
Useful for drivers that only care about the combined damage. v2: Remove unnecessary clearing of damage clips Cc: Deepak Rawat Signed-off-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Daniel Vetter --- drivers/gpu/drm/drm_damage_helper.c | 41 + include/drm

[PATCH v2 3/5] drm/tinydrm: Use struct drm_rect

2019-01-11 Thread Noralf Trønnes
-by: Noralf Trønnes Acked-by: Sam Ravnborg Acked-by: Daniel Vetter --- .../gpu/drm/tinydrm/core/tinydrm-helpers.c| 19 drivers/gpu/drm/tinydrm/ili9225.c | 43 ++- drivers/gpu/drm/tinydrm/mipi-dbi.c| 21 - drivers/gpu/drm/tinydrm/repaper.c

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