drm/vboxvideo: Move the vboxvideo driver out of staging
Subsystems (4)
cover drm/vboxvideo: Move the vboxvideo driver out of staging
Hi All,
This patch-series addresses the 2 TODO / FIXME items recently reported by Daniel and after that moves the vboxvideo driver out of staging.
Note this applies on top of drm-misc-next + this patch:
https://patchwork.kernel.org/patch/10824279/
Currently that patch is not yet in drm-misc, I can push it myself before pushing the rest of this series (after review).
Greg, the intent is for this series to be merged upstream through drm-misc, may we have your Acked-by for that please?
Regards,
Hans
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 1/3 staging/vboxvideo: Drop initial_mode_queried workaround
Drop the initial_mode_queried workaround for kms clients which do not support hotplug, all kms clients should be able to deal with hotplug.
--- drivers/staging/vboxvideo/TODO | 3 --- drivers/staging/vboxvideo/vbox_drv.c | 25 ------------------------- drivers/staging/vboxvideo/vbox_drv.h | 6 ------ drivers/staging/vboxvideo/vbox_main.c | 6 +++--- drivers/staging/vboxvideo/vbox_mode.c | 21 ++------------------- 5 files changed, 5 insertions(+), 56 deletions(-)
drivers/staging/vboxvideo/TODO +0 -3
@@ -1,8 +1,5 @@ TODO: -Get a full review from the drm-maintainers on dri-devel done on this driver --Drop all the logic around initial_mode_queried, the master_set and - master_drop callbacks and everything related to this. kms clients can handle - hotplugs. -Extend this TODO with the results of that review Please send any patches to Greg Kroah-Hartman <[email protected]>,
drivers/staging/vboxvideo/vbox_drv.c +0 -25
@@ -200,36 +200,11 @@ static const struct file_operations vbox_fops = { .read = drm_read, }; -static int vbox_master_set (struct drm_device *dev, -struct drm_file *file_priv,bool from_open) -{ -struct vbox_private *vbox = dev->dev_private; - -/* -* We do not yet know whether the new owner can handle hotplug, so we -* do not advertise dynamic modes on the first query and send a -* tentative hotplug notification after that to see if they query again. -*/ - vbox->initial_mode_queried = false; - -return 0 ; -} - -static void vbox_master_drop (struct drm_device *dev,struct drm_file *file_priv) -{ -struct vbox_private *vbox = dev->dev_private; - -/* See vbox_master_set() */ - vbox->initial_mode_queried = false; -} -static struct drm_driver driver = { .driver_features =DRIVER_MODESET |DRIVER_GEM |DRIVER_PRIME |DRIVER_ATOMIC , .lastclose = drm_fb_helper_lastclose, - .master_set = vbox_master_set, - .master_drop = vbox_master_drop, .fops = &vbox_fops, .irq_handler = vbox_irq_handler,
drivers/staging/vboxvideo/vbox_drv.h +0 -6
@@ -83,12 +83,6 @@ struct vbox_private { } ttm;struct mutex hw_mutex;/* protects modeset and accel/vbva accesses */ -/* -* We decide whether or not user-space supports display hot-plug -* depending on whether they react to a hot-plug event after the initial -* mode query. -*/ -bool initial_mode_queried;struct work_struct hotplug_work;u32 input_mapping_width;u32 input_mapping_height;
drivers/staging/vboxvideo/vbox_main.c +3 -3
@@ -32,9 +32,9 @@ void vbox_report_caps(struct vbox_private *vbox)u32 caps =VBVACAPS_DISABLE_CURSOR_INTEGRATION |VBVACAPS_IRQ |VBVACAPS_USE_VBVA_ONLY ; -if (vbox->initial_mode_queried) - caps |=VBVACAPS_VIDEO_MODE_HINTS ; - +/* The host only accepts VIDEO_MODE_HINTS if it is send separately. */ +hgsmi_send_caps_info (vbox->guest_pool, caps); + caps |=VBVACAPS_VIDEO_MODE_HINTS ;hgsmi_send_caps_info (vbox->guest_pool, caps); }
drivers/staging/vboxvideo/vbox_mode.c +2 -19
@@ -736,29 +736,12 @@ static int vbox_get_modes(struct drm_connector *connector) vbox_connector =to_vbox_connector (connector); vbox = connector->dev->dev_private; -/* -* Heuristic: we do not want to tell the host that we support dynamic -* resizing unless we feel confident that the user space client using -* the video driver can handle hot-plug events. So the first time modes -* are queried after a "master" switch we tell the host that we do not, -* and immediately after we send the client a hot-plug notification as -* a test to see if they will respond and query again. -* That is also the reason why capabilities are reported to the host at -* this place in the code rather than elsewhere. -* We need to report the flags location before reporting the IRQ -* capability. -*/ +hgsmi_report_flags_location (vbox->guest_pool,GUEST_HEAP_OFFSET (vbox) +HOST_FLAGS_OFFSET );if (vbox_connector->vbox_crtc->crtc_id ==0 )vbox_report_caps (vbox); -if (!vbox->initial_mode_queried) { -if (vbox_connector->vbox_crtc->crtc_id ==0 ) { - vbox->initial_mode_queried = true; -vbox_report_hotplug (vbox); - } -return drm_add_modes_noedid (connector,800 ,600 ); - } + num_modes =drm_add_modes_noedid (connector,2560 ,1600 ); preferred_width = vbox_connector->mode_hint.width ? vbox_connector->mode_hint.width :1024 ;
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 2/3 staging/vboxvideo: Refactor vbox_update_mode_hints
In reply to Hans de GoedeRefactor vbox_update_mode_hints to no longer use the obsolete drm_modeset_lock_all() and switch it over to drm_connector_list_iter instead of directly accessing the list using list_for_each_entry.
--- drivers/staging/vboxvideo/vbox_irq.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/staging/vboxvideo/vbox_irq.c +7 -8
@@ -105,6 +105,7 @@ static void validate_or_set_position_hints(struct vbox_private *vbox)/* Query the host for the most recent video mode hints. */ static void vbox_update_mode_hints (struct vbox_private *vbox) { +struct drm_connector_list_iter conn_iter;struct drm_device *dev = &vbox->ddev;struct drm_connector *connector;struct vbox_connector *vbox_conn;
@@ -122,13 +123,10 @@ static void vbox_update_mode_hints(struct vbox_private *vbox) }validate_or_set_position_hints (vbox); -drm_modeset_lock_all (dev); -/* -* FIXME: this needs to use drm_connector_list_iter and some real -* locking for the actual data it changes, not the deprecated -* drm_modeset_lock_all() shotgun approach. -*/ -list_for_each_entry (connector, &dev->mode_config.connector_list, head) { + +drm_modeset_lock (&dev->mode_config.connection_mutex,NULL ); +drm_connector_list_iter_begin (dev, &conn_iter); +drm_for_each_connector_iter (connector, &conn_iter) { vbox_conn =to_vbox_connector (connector); hints = &vbox->last_mode_hints[vbox_conn->vbox_crtc->crtc_id];
@@ -157,7 +155,8 @@ static void vbox_update_mode_hints(struct vbox_private *vbox) vbox_conn->vbox_crtc->disconnected = disconnected; } -drm_modeset_unlock_all (dev); +drm_connector_list_iter_end (&conn_iter); +drm_modeset_unlock (&dev->mode_config.connection_mutex); }static void vbox_hotplug_worker (struct work_struct *work)
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 3/3 drm/vboxvideo: Move the vboxvideo driver out of staging
In reply to Hans de GoedeThe vboxvideo driver has been converted to the atomic modesetting API and all FIXME and TODO items have been fixed, so it is time to move it out of staging.
---
drivers/gpu/drm/Kconfig | 2 ++
drivers/gpu/drm/Makefile | 1 +
drivers/{staging => gpu/drm}/vboxvideo/Kconfig | 0
drivers/{staging => gpu/drm}/vboxvideo/Makefile | 0
drivers/{staging => gpu/drm}/vboxvideo/hgsmi_base.c | 0
drivers/{staging => gpu/drm}/vboxvideo/hgsmi_ch_setup.h | 0
drivers/{staging => gpu/drm}/vboxvideo/hgsmi_channels.h | 0
drivers/{staging => gpu/drm}/vboxvideo/hgsmi_defs.h | 0
drivers/{staging => gpu/drm}/vboxvideo/modesetting.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_drv.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_drv.h | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_fb.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_hgsmi.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_irq.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_main.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_mode.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_prime.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vbox_ttm.c | 0
drivers/{staging => gpu/drm}/vboxvideo/vboxvideo.h | 0
drivers/{staging => gpu/drm}/vboxvideo/vboxvideo_guest.h | 0
drivers/{staging => gpu/drm}/vboxvideo/vboxvideo_vbe.h | 0
drivers/{staging => gpu/drm}/vboxvideo/vbva_base.c | 0
drivers/staging/Kconfig | 2 --
drivers/staging/Makefile | 1 -
drivers/staging/vboxvideo/TODO | 7 -------
25 files changed, 3 insertions(+), 10 deletions(-)
rename drivers/{staging => gpu/drm}/vboxvideo/Kconfig (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/Makefile (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/hgsmi_base.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/hgsmi_ch_setup.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/hgsmi_channels.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/hgsmi_defs.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/modesetting.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_drv.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_drv.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_fb.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_hgsmi.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_irq.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_main.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_mode.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_prime.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbox_ttm.c (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vboxvideo.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vboxvideo_guest.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vboxvideo_vbe.h (100%)
rename drivers/{staging => gpu/drm}/vboxvideo/vbva_base.c (100%)
delete mode 100644 drivers/staging/vboxvideo/TODOdrivers/gpu/drm/Kconfig +2 -0
@@ -333,6 +333,8 @@ source "drivers/gpu/drm/tve200/Kconfig" source "drivers/gpu/drm/xen/Kconfig" +source "drivers/gpu/drm/vboxvideo/Kconfig" + # Keep legacy drivers last menuconfig DRM_LEGACY
drivers/gpu/drm/Makefile +1 -0
@@ -109,3 +109,4 @@ obj-$(CONFIG_DRM_TINYDRM) += tinydrm/ obj-$(CONFIG_DRM_PL111) += pl111/ obj-$(CONFIG_DRM_TVE200) += tve200/ obj-$(CONFIG_DRM_XEN) += xen/ +obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/
drivers/gpu/drm/vboxvideo/Kconfig renamed from drivers/staging/vboxvideo/Kconfig +0 -0
drivers/gpu/drm/vboxvideo/Makefile renamed from drivers/staging/vboxvideo/Makefile +0 -0
drivers/gpu/drm/vboxvideo/hgsmi_base.c renamed from drivers/staging/vboxvideo/hgsmi_base.c +0 -0
drivers/gpu/drm/vboxvideo/hgsmi_ch_setup.h renamed from drivers/staging/vboxvideo/hgsmi_ch_setup.h +0 -0
drivers/gpu/drm/vboxvideo/hgsmi_channels.h renamed from drivers/staging/vboxvideo/hgsmi_channels.h +0 -0
drivers/gpu/drm/vboxvideo/hgsmi_defs.h renamed from drivers/staging/vboxvideo/hgsmi_defs.h +0 -0
drivers/gpu/drm/vboxvideo/modesetting.c renamed from drivers/staging/vboxvideo/modesetting.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_drv.c renamed from drivers/staging/vboxvideo/vbox_drv.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_drv.h renamed from drivers/staging/vboxvideo/vbox_drv.h +0 -0
drivers/gpu/drm/vboxvideo/vbox_fb.c renamed from drivers/staging/vboxvideo/vbox_fb.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_hgsmi.c renamed from drivers/staging/vboxvideo/vbox_hgsmi.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_irq.c renamed from drivers/staging/vboxvideo/vbox_irq.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_main.c renamed from drivers/staging/vboxvideo/vbox_main.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_mode.c renamed from drivers/staging/vboxvideo/vbox_mode.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_prime.c renamed from drivers/staging/vboxvideo/vbox_prime.c +0 -0
drivers/gpu/drm/vboxvideo/vbox_ttm.c renamed from drivers/staging/vboxvideo/vbox_ttm.c +0 -0
drivers/gpu/drm/vboxvideo/vboxvideo.h renamed from drivers/staging/vboxvideo/vboxvideo.h +0 -0
drivers/gpu/drm/vboxvideo/vboxvideo_guest.h renamed from drivers/staging/vboxvideo/vboxvideo_guest.h +0 -0
drivers/gpu/drm/vboxvideo/vboxvideo_vbe.h renamed from drivers/staging/vboxvideo/vboxvideo_vbe.h +0 -0
drivers/gpu/drm/vboxvideo/vbva_base.c renamed from drivers/staging/vboxvideo/vbva_base.c +0 -0
drivers/staging/Kconfig +0 -2
@@ -98,8 +98,6 @@ source "drivers/staging/greybus/Kconfig" source "drivers/staging/vc04_services/Kconfig" -source "drivers/staging/vboxvideo/Kconfig" - source "drivers/staging/pi433/Kconfig" source "drivers/staging/mt7621-pci/Kconfig"
drivers/staging/Makefile +0 -1
@@ -39,7 +39,6 @@ obj-$(CONFIG_MOST) += most/ obj-$(CONFIG_KS7010) += ks7010/ obj-$(CONFIG_GREYBUS) += greybus/ obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/ -obj-$(CONFIG_DRM_VBOXVIDEO) += vboxvideo/ obj-$(CONFIG_PI433) += pi433/ obj-$(CONFIG_SOC_MT7621) += mt7621-pci/ obj-$(CONFIG_SOC_MT7621) += mt7621-pinctrl/
drivers/staging/vboxvideo/TODO deleted +0 -7
@@ -1,7 +0,0 @@ -TODO: --Get a full review from the drm-maintainers on dri-devel done on this driver --Extend this TODO with the results of that review - -Please send any patches to Greg Kroah-Hartman <[email protected]>, -Hans de Goede <[email protected]>, Michael Thayer <[email protected]> -and [email protected] .
Signature · 6 lines
2.20.1 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 5 lines · Hans de Goede
Hi All,
This patch-series addresses the 2 TODO / FIXME items recently reported by Daniel and after that moves the vboxvideo driver out of staging.
Quoted 9 lines
Note this applies on top of drm-misc-next + this patch:
https://patchwork.kernel.org/patch/10824279/Currently that patch is not yet in drm-misc, I can push it myself before pushing the rest of this series (after review).
Greg, the intent is for this series to be merged upstream through drm-misc, may we have your Acked-by for that please?
For all 3:
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Daniel Vetter
Acked-byQuoted 12 lines · Greg Kroah-Hartman
Quoted 11 lines · Hans de Goede
Hi All,
This patch-series addresses the 2 TODO / FIXME items recently reported by Daniel and after that moves the vboxvideo driver out of staging.
Note this applies on top of drm-misc-next + this patch:
https://patchwork.kernel.org/patch/10824279/Currently that patch is not yet in drm-misc, I can push it myself before pushing the rest of this series (after review).
Quoted 7 lines
Quoted 3 lines
Greg, the intent is for this series to be merged upstream through drm-misc, may we have your Acked-by for that please?
For all 3:
Please add a patch 4 to add a MAINTAINERS entry pointing at the drm-misc git repo (and I guess Hans as maintainer/reviewer). With that, on all 4 patches:
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 19 lines · Daniel Vetter
Quoted 18 lines · Greg Kroah-Hartman
Quoted 5 lines · Hans de Goede
Hi All,
This patch-series addresses the 2 TODO / FIXME items recently reported by Daniel and after that moves the vboxvideo driver out of staging.
Quoted 9 lines
Note this applies on top of drm-misc-next + this patch:
https://patchwork.kernel.org/patch/10824279/Currently that patch is not yet in drm-misc, I can push it myself before pushing the rest of this series (after review).
Greg, the intent is for this series to be merged upstream through drm-misc, may we have your Acked-by for that please?
For all 3:
Quoted 7 lines
Quoted 1 line
Please add a patch 4 to add a
MAINTAINERSentry pointing at the drm-misc git repo (and I guess Hans as maintainer/reviewer). With that, on all 4 patches:Acked-by Daniel Vetter <[email protected]>
Thank you. I agree this needs a MAINTAINERS entry.
Note I will send out the MAINTAINRS / 4th patch now, so that patchwork picks it up and dim can extract a patchwork URL.
Regards,
Hans
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel