drm: Let userspace check if driver supports modeset
Subsystems (3)
PATCH 1/6 drm: Let userspace check if driver supports modeset
GPU accelerators usually don't have display block or the display driver part can be disable when building driver(for servers it save some resources) so it is important let userspace check this capability too.
--- drivers/gpu/drm/drm_ioctl.c | 3 +++ include/uapi/drm/drm.h | 1 + 2 files changed, 4 insertions(+)
drivers/gpu/drm/drm_ioctl.c +3 -0
@@ -244,6 +244,9 @@ static int drm_getcap(struct drm_device *dev, void *data, struct drm_file *file_case DRM_CAP_SYNCOBJ : req->value =drm_core_check_feature (dev,DRIVER_SYNCOBJ );return 0 ; +case DRM_CAP_MODESET : + req->value =drm_core_check_feature (dev,DRIVER_MODESET ); +return 0 ; }/* Other caps only work with KMS drivers */
include/uapi/drm/drm.h +1 -0
@@ -649,6 +649,7 @@ struct drm_gem_open {#define DRM_CAP_PAGE_FLIP_TARGET 0x11#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12#define DRM_CAP_SYNCOBJ 0x13 +#define DRM_CAP_MODESET 0x14/** DRM_IOCTL_GET_CAP ioctl argument type */ struct drm_get_cap {
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/6 drm/i915: Set PCH as NOP if display is disabled
num_pipes is set to 0 if disable_display is set inside intel_device_info_runtime_init() but when that happen PCH will already be set in intel_detect_pch().
i915_driver_load()
i915_driver_init_early() ... intel_detect_pch() ... ... i915_driver_init_hw() intel_device_info_runtime_init()
--- drivers/gpu/drm/i915/i915_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_drv.c +2 -1
@@ -287,7 +287,8 @@ static void intel_detect_pch(struct drm_i915_private *dev_priv)* Use PCH_NOP (PCH but no South Display) for PCH platforms without * display. */ -if (pch &&INTEL_INFO (dev_priv)->num_pipes ==0 ) { +if (pch && ((INTEL_INFO (dev_priv)->num_pipes ==0 ) || + i915_modparams.disable_display)) {DRM_DEBUG_KMS ("Display disabled, reverting to NOP PCH\n" ); dev_priv->pch_type =PCH_NOP ; dev_priv->pch_id =0 ;
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/6 drm/i915: Move out non-modeset calls from modeset init and cleanup
In reply to José Roberto de Souzai915_load_modeset_init() and intel_modeset_cleanup() was initializing and cleaning up things that is not modeset only.
This will make easy initialize drive without display part.
--- drivers/gpu/drm/i915/i915_drv.c | 56 ++++++++++++++++++---------- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_display.c | 16 +++----- 3 files changed, 42 insertions(+), 31 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +36 -20
@@ -665,25 +665,15 @@ static int i915_load_modeset_init(struct drm_device *dev)/* must happen before intel_power_domains_init_hw() on VLV/CHV */ intel_update_rawclk (dev_priv); -intel_power_domains_init_hw (dev_priv, false); -intel_csr_ucode_init (dev_priv); - ret =intel_irq_install (dev_priv); -if (ret) - goto cleanup_csr; -intel_setup_gmbus (dev_priv);/* Important: The output setup functions called by modeset_init need * working irqs for e.g. gmbus and dp aux transfers. */ ret =intel_modeset_init (dev);if (ret) - goto cleanup_irq; - - ret =i915_gem_init (dev_priv); -if (ret) - goto cleanup_modeset; + goto cleanup_gmbus;intel_setup_overlay (dev_priv);
@@ -692,23 +682,17 @@ static int i915_load_modeset_init(struct drm_device *dev) ret =intel_fbdev_init (dev);if (ret) - goto cleanup_gem; + goto cleanup_modeset;/* Only enable hotplug handling once the fbdev is fully set up. */ intel_hpd_init (dev_priv);return 0 ; -cleanup_gem: -if (i915_gem_suspend (dev_priv)) -DRM_ERROR ("failed to idle hardware; continuing to unload!\n" ); -i915_gem_fini (dev_priv); cleanup_modeset:intel_modeset_cleanup (dev); -cleanup_irq: -drm_irq_uninstall (dev); +cleanup_gmbus:intel_teardown_gmbus (dev_priv); -cleanup_csr:intel_csr_ucode_fini (dev_priv);intel_power_domains_fini (dev_priv);vga_switcheroo_unregister_client (pdev);
@@ -1395,9 +1379,22 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) goto out_cleanup_hw; } + ret =intel_irq_install (dev_priv); +if (ret) + goto out_cleanup_hw; + +/* i915_gem_init() call chain will call +* intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ); +*/ +intel_power_domains_init_hw (dev_priv, false); + + ret =i915_gem_init (dev_priv); +if (ret) + goto cleanup_irq; + ret =i915_load_modeset_init (&dev_priv->drm);if (ret <0 ) - goto out_cleanup_hw; + goto cleanup_gem;i915_driver_register (dev_priv);
@@ -1411,6 +1408,12 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)return 0 ; +cleanup_gem: +if (i915_gem_suspend (dev_priv)) +DRM_ERROR ("failed to idle hardware; continuing to unload!\n" ); +i915_gem_fini (dev_priv); +cleanup_irq: +drm_irq_uninstall (&dev_priv->drm); out_cleanup_hw:i915_driver_cleanup_hw (dev_priv); out_cleanup_mmio:
@@ -1445,8 +1448,21 @@ void i915_driver_unload(struct drm_device *dev)intel_gvt_cleanup (dev_priv); +intel_modeset_cleanup_prepare (dev); + +intel_disable_gt_powersave (dev_priv); + +/* +* Interrupts and polling as the first thing to avoid creating havoc. +* Too much stuff here (turning of connectors, ...) would +* experience fancy races otherwise. +*/ +intel_irq_uninstall (dev_priv); +intel_modeset_cleanup (dev); +intel_cleanup_gt_powersave (dev_priv); +intel_bios_cleanup (dev_priv);vga_switcheroo_unregister_client (pdev);
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -3419,6 +3419,7 @@ mkwrite_device_info(struct drm_i915_private *dev_priv)/* modesetting */ extern void intel_modeset_init_hw (struct drm_device *dev);extern int intel_modeset_init (struct drm_device *dev); +extern void intel_modeset_cleanup_prepare (struct drm_device *dev);extern void intel_modeset_cleanup (struct drm_device *dev);extern int intel_connector_register (struct drm_connector *);extern void intel_connector_unregister (struct drm_connector *);
drivers/gpu/drm/i915/intel_display.c +5 -11
@@ -15905,7 +15905,7 @@ static void intel_hpd_poll_fini(struct drm_device *dev)drm_connector_list_iter_end (&conn_iter); } -void intel_modeset_cleanup (struct drm_device *dev) +void intel_modeset_cleanup_prepare (struct drm_device *dev) {struct drm_i915_private *dev_priv =to_i915 (dev);
@@ -15913,15 +15913,11 @@ void intel_modeset_cleanup(struct drm_device *dev)flush_work (&dev_priv->atomic_helper.free_work);WARN_ON (!llist_empty (&dev_priv->atomic_helper.free_list)); +} -intel_disable_gt_powersave (dev_priv); - -/* -* Interrupts and polling as the first thing to avoid creating havoc. -* Too much stuff here (turning of connectors, ...) would -* experience fancy races otherwise. -*/ -intel_irq_uninstall (dev_priv); +void intel_modeset_cleanup (struct drm_device *dev) +{ +struct drm_i915_private *dev_priv =to_i915 (dev);/* * Due to the hpd irq storm handling the hotplug work can re-arm the
@@ -15943,8 +15939,6 @@ void intel_modeset_cleanup(struct drm_device *dev)intel_cleanup_overlay (dev_priv); -intel_cleanup_gt_powersave (dev_priv); -intel_teardown_gmbus (dev_priv);destroy_workqueue (dev_priv->modeset_wq);
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/6] drm/i915: Move out non-modeset calls from modeset init and cleanup
Quoting José Roberto de Souza (2018-07-16 23:38:38)
Quoted 11 lines
drivers/gpu/drm/i915/i915_drv.c +7
-0@@ -1395,9 +1379,22 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) goto out_cleanup_hw; } + ret =intel_irq_install (dev_priv); +if (ret) + goto out_cleanup_hw; + +/* i915_gem_init() call chain will call +* intel_display_power_put(i915, POWER_DOMAIN_GT_IRQ); +*/
drivers/gpu/drm/i915/i915_drv.c int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent) · line 1397
Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +7
-1+intel_power_domains_init_hw (dev_priv, false); + + ret =i915_gem_init (dev_priv); +if (ret) + goto cleanup_irq; + ret =i915_load_modeset_init (&dev_priv->drm);if (ret <0 ) - goto out_cleanup_hw; + goto cleanup_gem;
Bzzt. Order is extremely important. e.g. modeset init needs to reserve portions of the GTT still in use by the BIOS before we wipe it. -Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 4/6 drm/i915: Move drm_vblank_init() to i915_load_modeset_init()
In reply to José Roberto de Souzai915_load_modeset_init() is a more suitable place than i915_driver_load() as vblank is part of modeset API.
--- drivers/gpu/drm/i915/i915_drv.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +7 -12
@@ -643,6 +643,13 @@ static int i915_load_modeset_init(struct drm_device *dev)if (i915_inject_load_failure ())return -ENODEV ; +if (INTEL_INFO (dev_priv)->num_pipes ==0 ) { + ret =drm_vblank_init (&dev_priv->drm, +INTEL_INFO (dev_priv)->num_pipes); +if (ret) + goto out; + } +intel_bios_init (dev_priv);/* If we have > 1 VGA cards, then we need to arbitrate access
@@ -1367,18 +1374,6 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)if (ret <0 ) goto out_cleanup_mmio; -/* -* TODO: move the vblank init and parts of modeset init steps into one -* of the i915_driver_init_/i915_driver_register functions according -* to the role/effect of the given init step. -*/ -if (INTEL_INFO (dev_priv)->num_pipes) { - ret =drm_vblank_init (&dev_priv->drm, -INTEL_INFO (dev_priv)->num_pipes); -if (ret) - goto out_cleanup_hw; - } - ret =intel_irq_install (dev_priv);if (ret) goto out_cleanup_hw;
Signature · 6 lines
2.18.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 5/6 drm/i915: Do not call modeset related functions when display is disabled
In reply to José Roberto de SouzaNo need to run i915_load_modeset_init() when num_pipes == 0 also kms depends on things initialized in i915_load_modeset_init() so not initializing it too. fbdev and audio have guards against num_pipes == 0 but lets move it to the if block to make it explicit to readers.
Also as planes, CRTCs, encoders and connectors are not being added it is necessary to unset the MODESET driver feature otherwise it will crash when registering driver in drm, also disabling ATOMIC as do not make sense have ATOMIC and do not have MODESET.
There is more modeset/display calls that still needs to be removed, this is a initial work.
--- drivers/gpu/drm/i915/i915_drv.c | 69 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 28 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +41 -28
@@ -1248,23 +1248,26 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)if (IS_GEN5 (dev_priv))intel_gpu_ips_init (dev_priv); -intel_audio_init (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) { +intel_audio_init (dev_priv); -/* -* Some ports require correctly set-up hpd registers for detection to -* work properly (leading to ghost connected connector status), e.g. VGA -* on gm45. Hence we can only set up the initial fbdev config after hpd -* irqs are fully enabled. We do it last so that the async config -* cannot run before the connectors are registered. -*/ -intel_fbdev_initial_config_async (dev); +/* +* Some ports require correctly set-up hpd registers for +* detection to work properly (leading to ghost connected +* connector status), e.g. VGA on gm45. Hence we can only set +* up the initial fbdev config after hpd irqs are fully enabled. +* We do it last so that the async config cannot run before the +* connectors are registered. +*/ +intel_fbdev_initial_config_async (dev); -/* -* We need to coordinate the hotplugs with the asynchronous fbdev -* configuration, for which we use the fbdev->async_cookie. -*/ -if (INTEL_INFO (dev_priv)->num_pipes) +/* +* We need to coordinate the hotplugs with the asynchronous +* fbdev configuration, for which we use the +* fbdev->async_cookie. +*/ drm_kms_helper_poll_init (dev); + } }/**
@@ -1273,15 +1276,17 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)*/ static void i915_driver_unregister (struct drm_i915_private *dev_priv) { -intel_fbdev_unregister (dev_priv); -intel_audio_deinit (dev_priv); +if (INTEL_INFO (dev_priv)->num_pipes) { +intel_fbdev_unregister (dev_priv); +intel_audio_deinit (dev_priv); -/* -* After flushing the fbdev (incl. a late async config which will -* have delayed queuing of a hotplug event), then flush the hotplug -* events. -*/ -drm_kms_helper_poll_fini (&dev_priv->drm); +/* +* After flushing the fbdev (incl. a late async config which +* will have delayed queuing of a hotplug event), then flush the +* hotplug events. +*/ +drm_kms_helper_poll_fini (&dev_priv->drm); + }intel_gpu_ips_teardown ();acpi_video_unregister ();
@@ -1333,6 +1338,9 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)if (!i915_modparams.nuclear_pageflip && match_info->gen <5 ) driver.driver_features &= ~DRIVER_ATOMIC ; +if (i915_modparams.disable_display) + driver.driver_features &= ~(DRIVER_MODESET |DRIVER_ATOMIC ); + ret = -ENOMEM ; dev_priv =kzalloc (sizeof (*dev_priv),GFP_KERNEL );if (dev_priv)
@@ -1387,9 +1395,11 @@ int i915_driver_load(struct pci_dev *pdev, const struct pci_device_id *ent)if (ret) goto cleanup_irq; - ret =i915_load_modeset_init (&dev_priv->drm); -if (ret <0 ) - goto cleanup_gem; +if (INTEL_INFO (dev_priv)->num_pipes) { + ret =i915_load_modeset_init (&dev_priv->drm); +if (ret <0 ) + goto cleanup_gem; + }i915_driver_register (dev_priv);
@@ -1439,11 +1449,13 @@ void i915_driver_unload(struct drm_device *dev)intel_display_power_get (dev_priv,POWER_DOMAIN_INIT ); -drm_atomic_helper_shutdown (dev); +if (INTEL_INFO (dev_priv)->num_pipes) +drm_atomic_helper_shutdown (dev);intel_gvt_cleanup (dev_priv); -intel_modeset_cleanup_prepare (dev); +if (INTEL_INFO (dev_priv)->num_pipes) +intel_modeset_cleanup_prepare (dev);intel_disable_gt_powersave (dev_priv);
@@ -1454,7 +1466,8 @@ void i915_driver_unload(struct drm_device *dev)*/ intel_irq_uninstall (dev_priv); -intel_modeset_cleanup (dev); +if (INTEL_INFO (dev_priv)->num_pipes) +intel_modeset_cleanup (dev);intel_cleanup_gt_powersave (dev_priv);
Signature · 6 lines
2.18.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
PATCH 6/6 drm/i915: Remove redundante checks for num_pipes == 0
In reply to José Roberto de SouzaThis 'if's will always be false because of previous changes.
--- drivers/gpu/drm/i915/i915_drv.c | 12 +++--------- drivers/gpu/drm/i915/intel_audio.c | 3 --- drivers/gpu/drm/i915/intel_display.c | 3 --- drivers/gpu/drm/i915/intel_i2c.c | 3 --- 4 files changed, 3 insertions(+), 18 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +3 -9
@@ -643,12 +643,9 @@ static int i915_load_modeset_init(struct drm_device *dev)if (i915_inject_load_failure ())return -ENODEV ; -if (INTEL_INFO (dev_priv)->num_pipes ==0 ) { - ret =drm_vblank_init (&dev_priv->drm, -INTEL_INFO (dev_priv)->num_pipes); -if (ret) - goto out; - } + ret =drm_vblank_init (&dev_priv->drm,INTEL_INFO (dev_priv)->num_pipes); +if (ret) + goto out;intel_bios_init (dev_priv);
@@ -684,9 +681,6 @@ static int i915_load_modeset_init(struct drm_device *dev)intel_setup_overlay (dev_priv); -if (INTEL_INFO (dev_priv)->num_pipes ==0 ) -return 0 ; - ret =intel_fbdev_init (dev);if (ret) goto cleanup_modeset;
drivers/gpu/drm/i915/intel_audio.c +0 -3
@@ -960,9 +960,6 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv) {int ret; -if (INTEL_INFO (dev_priv)->num_pipes ==0 ) -return ; - ret =component_add (dev_priv->drm.dev, &i915_audio_component_bind_ops);if (ret <0 ) {DRM_ERROR ("failed to add audio component (%d)\n" , ret);
drivers/gpu/drm/i915/intel_display.c +0 -3
@@ -15137,9 +15137,6 @@ int intel_modeset_init(struct drm_device *dev)intel_init_pm (dev_priv); -if (INTEL_INFO (dev_priv)->num_pipes ==0 ) -return 0 ; -/* * There may be no VBT; and if the BIOS enabled SSC we can * just keep using it to avoid unnecessary flicker. Whereas if the
drivers/gpu/drm/i915/intel_i2c.c +0 -3
@@ -819,9 +819,6 @@ int intel_setup_gmbus(struct drm_i915_private *dev_priv)unsigned int pin;int ret; -if (INTEL_INFO (dev_priv)->num_pipes ==0 ) -return 0 ; -if (IS_VALLEYVIEW (dev_priv) ||IS_CHERRYVIEW (dev_priv)) dev_priv->gpio_mmio_base =VLV_DISPLAY_BASE ;else if (!HAS_GMCH_DISPLAY (dev_priv))
Signature · 6 lines
2.18.0 _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoting José Roberto de Souza (2018-07-16 23:38:36)
Quoted 4 lines
GPU accelerators usually don't have display block or the display driver part can be disable when building driver(for servers it save some resources) so it is important let userspace check this capability too.
We currently communicate that by having no modeset resources. What does another cap bit accomplish that we don't already know? -Chris
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 9 lines · Chris Wilson
Quoting José Roberto de Souza (2018-07-16 23:38:36)
Quoted 4 lines
GPU accelerators usually don't have display block or the display driver part can be disable when building driver(for servers it save some resources) so it is important let userspace check this capability too.
We currently communicate that by having no modeset resources. What does
another cap bit accomplish that we don't already know?
This is a hackish way to check if driver support modeset, drmModeGetResources()/drm_mode_getresources() can fail and return null by other reasons and just check for the errno value can be misleading too.
Quoted 1 line
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Souza, Jose (2018-07-17 18:02:17)
Quoted 7 lines · Chris Wilson
Quoted 6 lines
Quoting José Roberto de Souza (2018-07-16 23:38:36)
Quoted 4 lines
GPU accelerators usually don't have display block or the display driver part can be disable when building driver(for servers it save some resources) so it is important let userspace check this capability too.
Quoted 8 lines
Quoted 3 lines
We currently communicate that by having no modeset resources. What does
another cap bit accomplish that we don't already know?This is a hackish way to check if driver support modeset, drmModeGetResources()/drm_mode_getresources() can fail and return null by other reasons and just check for the errno value can be misleading too.
Do not confuse libdrm with the ioctl. You do not need to allocate anything for such a check, and it is being used directly without allocations as a has-kms check.
More to the point existing userspace determines modeset capability through the reported resources. Your changelog needs to explain why they are inadequate and how you plan to coordinate your fix with userspace. As it stands you are introducing uABI with no user...
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Rodrigo Vivi
maintainerQuoted 17 lines · Chris Wilson
Quoting Souza, Jose (2018-07-17 18:02:17)
Quoted 7 lines · Chris Wilson
Quoted 6 lines
Quoting José Roberto de Souza (2018-07-16 23:38:36)
Quoted 4 lines
GPU accelerators usually don't have display block or the display driver part can be disable when building driver(for servers it save some resources) so it is important let userspace check this capability too.
Quoted 8 lines
Quoted 3 lines
We currently communicate that by having no modeset resources. What does
another cap bit accomplish that we don't already know?This is a hackish way to check if driver support modeset, drmModeGetResources()/drm_mode_getresources() can fail and return null by other reasons and just check for the errno value can be misleading too.
Quoted 8 lines
Do not confuse libdrm with the ioctl. You do not need to allocate anything for such a check, and it is being used directly without allocations as a has-kms check.
More to the point existing userspace determines modeset capability through the reported resources. Your changelog needs to explain why they are inadequate and how you plan to coordinate your fix with userspace. As it stands you are introducing uABI with no user...
I agree with Chris here. There is no indication on how this will affect userspace here and this so far is just a uABI without user that is a big blocker.
And I also got confused because that modeset capability check got introduced in a block that is for
"/* Only some caps make sense with UMS/render-only drivers. */"
Quoted 5 lines
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 34 lines · Rodrigo Vivi
Quoted 26 lines · Chris Wilson
Quoting Souza, Jose (2018-07-17 18:02:17)
Quoted 14 lines · Chris Wilson
Quoted 8 lines
Quoting José Roberto de Souza (2018-07-16 23:38:36)
Quoted 6 lines
GPU accelerators usually don't have display block or the display
driver part can be disable when building driver(for servers it save
some resources) so it is important let userspace check this capability too.Quoted 4 lines
We currently communicate that by having no modeset resources. What
does
another cap bit accomplish that we don't already know?Quoted 6 lines
This is a hackish way to check if driver support modeset, drmModeGetResources()/drm_mode_getresources() can fail and return null
by other reasons and just check for the errno value can be misleading
too.Do not confuse libdrm with the ioctl. You do not need to allocate anything for such a check, and it is being used directly without allocations as a has-kms check.
Quoted 6 lines
More to the point existing userspace determines modeset capability through the reported resources. Your changelog needs to explain why they
are inadequate and how you plan to coordinate your fix with userspace.
As it stands you are introducing uABI with no user...
Quoted 3 lines
I agree with Chris here. There is no indication on how this will affect userspace here and this so far is just a uABI without user that is a big blocker.
The user would be IGT but I would only send the patch after get this merged.
Okay, I can drop this patch without any changes in this series.
Quoted 10 lines
And I also got confused because that modeset capability check got introduced in a block that is for
"/* Only some caps make sense with UMS/render-only drivers. */"Quoted 5 lines
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.CHECKPATCH: warning for series starting with [1/6] drm: Let userspace check if driver supports modeset
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm: Let userspace check if driver supports modeset
URL : https://patchwork.freedesktop.org/series/46630/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
a33368239fd0 drm: Let userspace check if driver supports modeset
8affd223d437 drm/i915: Set PCH as NOP if display is disabled
-:35: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis
#35: FILE: drivers/gpu/drm/i915/i915_drv.c:291:
+ if (pch && ((INTEL_INFO(dev_priv)->num_pipes == 0) ||
+ i915_modparams.disable_display)) {total: 0 errors, 0 warnings, 1 checks, 9 lines checked e10f71700cc3 drm/i915: Move out non-modeset calls from modeset init and cleanup -:140: CHECK:AVOID_EXTERNS: extern prototypes should be avoided in .h files #140: FILE: drivers/gpu/drm/i915/i915_drv.h:3422:
+extern void intel_modeset_cleanup_prepare(struct drm_device *dev);
total: 0 errors, 0 warnings, 1 checks, 149 lines checked52142362c518 drm/i915: Move drm_vblank_init() to i915_load_modeset_init() 75525cc5bfe3 drm/i915: Do not call modeset related functions when display is disabled c78fb816f22b drm/i915: Remove redundante checks for num_pipes == 0
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.SPARSE: warning for series starting with [1/6] drm: Let userspace check if driver supports modeset
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm: Let userspace check if driver supports modeset
URL : https://patchwork.freedesktop.org/series/46630/
State : warning
== Summary ==
$ dim sparse origin/drm-tip Commit: drm: Let userspace check if driver supports modeset Okay!
Commit: drm/i915: Set PCH as NOP if display is disabled Okay!
Commit: drm/i915: Move out non-modeset calls from modeset init and cleanup -drivers/gpu/drm/i915/selftests/../i915_drv.h:3653:16: warning: expression using sizeof(void) +drivers/gpu/drm/i915/selftests/../i915_drv.h:3654:16: warning: expression using sizeof(void)
Commit: drm/i915: Move drm_vblank_init() to i915_load_modeset_init() Okay!
Commit: drm/i915: Do not call modeset related functions when display is disabled Okay!
Commit: drm/i915: Remove redundante checks for num_pipes == 0 Okay!
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/6] drm: Let userspace check if driver supports modeset
In reply to José Roberto de Souza== Series Details ==
== Series Details ==
Series: series starting with [1/6] drm: Let userspace check if driver supports modeset
URL : https://patchwork.freedesktop.org/series/46630/
State : failure
== Summary ==
= CI Bug Log - changes from CI_DRM_4500 -> Patchwork_9681 =
== Summary - FAILURE ==
Serious unknown changes coming with Patchwork_9681 absolutely need to be verified manually.
If you think the reported changes have nothing to do with the changes introduced in Patchwork_9681, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI.
External URL: https://patchwork.freedesktop.org/api/1.0/series/46630/revisions/1/mbox/
== Possible new issues ==
Here are the unknown changes that may have been introduced in Patchwork_9681:
=== IGT changes ===
==== Possible regressions ====
igt@drv_module_reload@basic-no-display:
fi-snb-2520m: NOTRUN -> DMESG-WARN
fi-whl-u: PASS -> DMESG-WARN
fi-cfl-8700k: PASS -> DMESG-WARN
fi-ivb-3520m: PASS -> DMESG-WARN
fi-bdw-gvtdvm: PASS -> DMESG-WARN
fi-skl-guc: PASS -> DMESG-WARN
fi-kbl-7567u: PASS -> DMESG-WARN
fi-glk-j4005: PASS -> DMESG-WARN
fi-bdw-5557u: PASS -> DMESG-WARN
fi-kbl-r: PASS -> DMESG-WARN
fi-hsw-peppy: PASS -> DMESG-WARN
{fi-cfl-8109u}: PASS -> DMESG-WARN
fi-hsw-4770r: PASS -> DMESG-WARN
fi-skl-6260u: PASS -> DMESG-WARN
fi-snb-2600: PASS -> DMESG-WARN
fi-skl-6700k2: PASS -> DMESG-WARN
fi-skl-6770hq: PASS -> DMESG-WARN
fi-cfl-s3: PASS -> DMESG-WARN
fi-kbl-7560u: PASS -> DMESG-WARN
fi-ivb-3770: PASS -> DMESG-WARN
fi-skl-6600u: PASS -> DMESG-WARN
fi-kbl-guc: PASS -> DMESG-WARN
fi-kbl-7500u: PASS -> DMESG-WARN
fi-hsw-4770: PASS -> DMESG-WARN
fi-glk-dsi: PASS -> DMESG-WARN
fi-kbl-x1275: PASS -> DMESG-WARN
fi-skl-gvtdvm: PASS -> DMESG-FAIL
fi-skl-6700hq: PASS -> DMESG-FAIL
fi-bxt-j4205: PASS -> DMESG-WARN
fi-cfl-guc: PASS -> DMESG-WARN
igt@drv_module_reload@basic-reload-inject:
fi-skl-6700hq: PASS -> INCOMPLETE
igt@drv_selftest@live_coherency:
fi-glk-j4005: PASS -> DMESG-FAIL
igt@drv_selftest@live_hangcheck:
fi-cfl-guc: PASS -> DMESG-FAIL
igt@drv_selftest@live_hugepages:
fi-bxt-j4205: PASS -> DMESG-FAIL
igt@drv_selftest@live_uncore:
fi-glk-dsi: PASS -> DMESG-FAIL
igt@pm_rps@basic-api:
fi-byt-n2820: PASS -> DMESG-FAIL
fi-bsw-n3050: PASS -> DMESG-FAIL
fi-byt-j1900: PASS -> DMESG-FAIL
igt@prime_busy@basic-after-default:
fi-bsw-n3050: PASS -> INCOMPLETE
==== Warnings ====
igt@drv_selftest@live_contexts:
fi-bxt-j4205: PASS -> SKIP +3
igt@drv_selftest@live_execlists:
fi-glk-j4005: PASS -> SKIP +6
igt@drv_selftest@live_hugepages:
fi-glk-dsi: PASS -> SKIP +11== Known issues ==
Here are the changes found in Patchwork_9681 that come from known issues:
=== IGT changes ===
==== Issues hit ====
igt@drv_module_reload@basic-reload:
fi-glk-j4005: PASS -> DMESG-WARN (fdo#106725, fdo#106248)
igt@drv_module_reload@basic-reload-inject:
fi-skl-gvtdvm: PASS -> INCOMPLETE (fdo#105600)
igt@drv_selftest@live_hangcheck:
fi-skl-guc: PASS -> DMESG-FAIL (fdo#107174)
fi-kbl-guc: PASS -> DMESG-FAIL (fdo#106947)
fi-kbl-x1275: PASS -> DMESG-FAIL (fdo#106560, fdo#106947)
igt@drv_selftest@live_workarounds:
fi-kbl-7560u: PASS -> DMESG-FAIL (fdo#107257)
igt@gem_exec_suspend@basic-s4-devices:
{fi-kbl-8809g}: NOTRUN -> INCOMPLETE (fdo#107139)
igt@kms_busy@basic-flip-c:
fi-skl-6700hq: PASS -> DMESG-WARN (fdo#105998) +3
igt@prime_busy@basic-after-default:
fi-byt-j1900: PASS -> INCOMPLETE (fdo#102657)
fi-byt-n2820: PASS -> INCOMPLETE (fdo#102657)
==== Possible fixes ====
igt@debugfs_test@read_all_entries:
fi-snb-2520m: INCOMPLETE (fdo#103713) -> PASS
igt@gem_exec_suspend@basic-s3:
{fi-cfl-8109u}: DMESG-WARN -> PASS
igt@kms_flip@basic-flip-vs-modeset:
fi-glk-j4005: DMESG-WARN (fdo#106000) -> PASS
igt@kms_pipe_crc_basic@hang-read-crc-pipe-b:
fi-skl-6700hq: DMESG-WARN (fdo#105998) -> PASS +4
==== Warnings ====
igt@drv_module_reload@basic-no-display:
{fi-skl-iommu}: FAIL (fdo#106066, fdo#107189) -> DMESG-FAIL (fdo#107189) {name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
fdo#102657 https://bugs.freedesktop.org/show_bug.cgi?id=102657
fdo#103713 https://bugs.freedesktop.org/show_bug.cgi?id=103713
fdo#105600 https://bugs.freedesktop.org/show_bug.cgi?id=105600
fdo#105998 https://bugs.freedesktop.org/show_bug.cgi?id=105998
fdo#106000 https://bugs.freedesktop.org/show_bug.cgi?id=106000
fdo#106066 https://bugs.freedesktop.org/show_bug.cgi?id=106066
fdo#106248 https://bugs.freedesktop.org/show_bug.cgi?id=106248
fdo#106560 https://bugs.freedesktop.org/show_bug.cgi?id=106560
fdo#106725 https://bugs.freedesktop.org/show_bug.cgi?id=106725
fdo#106947 https://bugs.freedesktop.org/show_bug.cgi?id=106947
fdo#107139 https://bugs.freedesktop.org/show_bug.cgi?id=107139
fdo#107174 https://bugs.freedesktop.org/show_bug.cgi?id=107174
fdo#107189 https://bugs.freedesktop.org/show_bug.cgi?id=107189
fdo#107257 https://bugs.freedesktop.org/show_bug.cgi?id=107257
== Participating hosts (46 -> 42) ==
Additional (1): fi-kbl-8809g
Missing (5): fi-ctg-p8600 fi-ilk-m540 fi-byt-squawks fi-bsw-cyan fi-hsw-4200u
== Build changes ==
* Linux: CI_DRM_4500 -> Patchwork_9681
CI_DRM_4500: 83c81d39fd8918d96ddbc330d5dab44415479112 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_4559: 6d341aac2124836443ce74e8e97a4508ac8d5095 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_9681: c78fb816f22b820dafa61cc0373969d1bb86d26d @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
c78fb816f22b drm/i915: Remove redundante checks for num_pipes == 0 75525cc5bfe3 drm/i915: Do not call modeset related functions when display is disabled 52142362c518 drm/i915: Move drm_vblank_init() to i915_load_modeset_init() e10f71700cc3 drm/i915: Move out non-modeset calls from modeset init and cleanup 8affd223d437 drm/i915: Set PCH as NOP if display is disabled a33368239fd0 drm: Let userspace check if driver supports modeset
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_9681/issues.html
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx