search for: drm_core_check_featur

Displaying 20 results from an estimated 71 matches for "drm_core_check_featur".

Did you mean: drm_core_check_feature
2010 Jan 18
1
[PATCH] drm: remove UMS leftover
...u/nouveau_dma.c b/drivers/gpu/drm/nouveau/nouveau_dma.c --- a/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-01-18 12:48:09.193872773 +0100 +++ b/drivers/gpu/drm/nouveau/nouveau_dma.c 2010-01-18 12:50:01.639874519 +0100 @@ -77,11 +77,9 @@ return ret; /* Map M2MF notifier object - fbcon. */ - if (drm_core_check_feature(dev, DRIVER_MODESET)) { - ret = nouveau_bo_map(chan->notifier_bo); - if (ret) - return ret; - } + ret = nouveau_bo_map(chan->notifier_bo); + if (ret) + return ret; /* Insert NOPS for NOUVEAU_DMA_SKIPS */ ret = RING_SPACE(chan, NOUVEAU_DMA_SKIPS); diff -Naur a/drivers/gpu/drm/nouve...
2020 Feb 25
0
[PATCH 2/3] drm: Move non-kms driver state into struct drm_legacy_state
...ze = dev->driver->legacy->dev_priv_size; buf->dev_private = kzalloc(buf->dev_priv_size, GFP_KERNEL); if (!buf->dev_private) { /* Set count correctly so we free the proper amount. */ @@ -1581,8 +1581,8 @@ int drm_legacy_dma_ioctl(struct drm_device *dev, void *data, if (!drm_core_check_feature(dev, DRIVER_LEGACY)) return -EOPNOTSUPP; - if (dev->driver->dma_ioctl) - return dev->driver->dma_ioctl(dev, data, file_priv); + if (dev->driver->legacy->dma_ioctl) + return dev->driver->legacy->dma_ioctl(dev, data, file_priv); else return -EINVAL; } diff...
2017 Jul 19
2
[PATCH] drm: disable vblank only if it got previously enabled
...756bf2bd 100644 > --- a/drivers/gpu/drm/drm_vblank.c > +++ b/drivers/gpu/drm/drm_vblank.c > @@ -1140,8 +1140,11 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc) > > /* Avoid redundant vblank disables without previous > * drm_crtc_vblank_on(). */ > - if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) > + if (drm_core_check_feature(dev, DRIVER_ATOMIC) || (!vblank->inmodeset && > + vblank->enabled)) { > + DRM_DEBUG("disabling vblank on crtc %u\n", pipe); > drm_vblan...
2017 Jul 20
2
[PATCH] drm: disable vblank only if it got previously enabled
...blank.c >>> +++ b/drivers/gpu/drm/drm_vblank.c >>> @@ -1140,8 +1140,11 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc) >>> >>> /* Avoid redundant vblank disables without previous >>> * drm_crtc_vblank_on(). */ >>> - if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) >>> + if (drm_core_check_feature(dev, DRIVER_ATOMIC) || (!vblank->inmodeset && >>> + vblank->enabled)) { >>> + DRM_DEBUG("disabling vblank on crtc %u\n", pipe); >&g...
2009 Nov 19
2
[RFC] nouveau: Add basic i2c sensor chip support
...t; +#include "nouveau_thermal.h" static int nouveau_stub_init(struct drm_device *dev) { return 0; } static void nouveau_stub_takedown(struct drm_device *dev) {} @@ -434,8 +435,10 @@ nouveau_card_init(struct drm_device *dev) dev_priv->init_state = NOUVEAU_CARD_INIT_DONE; - if (drm_core_check_feature(dev, DRIVER_MODESET)) + if (drm_core_check_feature(dev, DRIVER_MODESET)) { drm_helper_initial_config(dev); + nouveau_thermal_init(dev); + } return 0; } @@ -470,8 +473,10 @@ static void nouveau_card_takedown(struct drm_device *dev) nouveau_mem_close(dev); engine->instmem.takedown(...
2017 Jul 16
3
[drm/nouveau] GeForce 8600 GT boot/suspend grumbling
On Sat, 2017-07-15 at 14:52 -0400, Ilia Mirkin wrote: > > OK, so this issue appears to be that we're calling > drm_crtc_vblank_off() on a crtc for which vblank is already disabled. > My guess is that this happens because the crtc is disabled. > > Not sure what the proper check is to see if vblanks are already disabled... Seems so, the below shut up suspend for both 8600 GT
2020 May 08
0
[RFC v4 03/12] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
...m_vblank_init_release(struct drm_device *dev, void *ptr) { - unsigned int pipe; - - for (pipe = 0; pipe < dev->num_crtcs; pipe++) { - struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; + struct drm_vblank_crtc *vblank = ptr; - WARN_ON(READ_ONCE(vblank->enabled) && - drm_core_check_feature(dev, DRIVER_MODESET)); + WARN_ON(READ_ONCE(vblank->enabled) && + drm_core_check_feature(dev, DRIVER_MODESET)); - del_timer_sync(&vblank->disable_timer); - } + del_timer_sync(&vblank->disable_timer); } /** @@ -510,7 +506,7 @@ static void drm_vblank_init_release(stru...
2020 Jun 22
0
[RFC v5 01/10] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
..._release(struct drm_device *dev, void *ptr) { - unsigned int pipe; - - for (pipe = 0; pipe < dev->num_crtcs; pipe++) { - struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; + struct drm_vblank_crtc *vblank = ptr; - drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && - drm_core_check_feature(dev, DRIVER_MODESET)); + drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && + drm_core_check_feature(dev, DRIVER_MODESET)); - del_timer_sync(&vblank->disable_timer); - } + del_timer_sync(&vblank->disable_timer); } /** @@ -511,7 +507,7 @@ static void drm_vblank_init...
2009 Dec 14
0
[PATCH] drm/nouveau: Unregister irq handler if init fails
..._device *dev) /* Initialise internal driver API hooks */ ret = nouveau_init_engine_ptrs(dev); if (ret) - return ret; + goto out; engine = &dev_priv->engine; dev_priv->init_state = NOUVEAU_CARD_INIT_FAILED; @@ -325,12 +325,12 @@ nouveau_card_init(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_MODESET)) { ret = nouveau_bios_init(dev); if (ret) - return ret; + goto out; } ret = nouveau_gpuobj_early_init(dev); if (ret) - return ret; + goto out; /* Initialise instance memory, must happen before mem_init so we * know exactly how much VRAM we're abl...
2009 Dec 14
0
[PATCH] drm/nouveau: Add proper error handling to nouveau_card_init
..._device *dev) /* Initialise internal driver API hooks */ ret = nouveau_init_engine_ptrs(dev); if (ret) - return ret; + goto out; engine = &dev_priv->engine; dev_priv->init_state = NOUVEAU_CARD_INIT_FAILED; @@ -325,12 +325,12 @@ nouveau_card_init(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_MODESET)) { ret = nouveau_bios_init(dev); if (ret) - return ret; + goto out; } ret = nouveau_gpuobj_early_init(dev); if (ret) - return ret; + goto out_bios; /* Initialise instance memory, must happen before mem_init so we * know exactly how much VRAM we'r...
2017 Jul 19
0
[PATCH] drm: disable vblank only if it got previously enabled
...ivers/gpu/drm/drm_vblank.c index a233a6be934a..4a21756bf2bd 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -1140,8 +1140,11 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc) /* Avoid redundant vblank disables without previous * drm_crtc_vblank_on(). */ - if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) + if (drm_core_check_feature(dev, DRIVER_ATOMIC) || (!vblank->inmodeset && + vblank->enabled)) { + DRM_DEBUG("disabling vblank on crtc %u\n", pipe); drm_vblank_disable_and_save(dev, pipe); + } wake_up(&vblank->qu...
2020 Feb 25
7
[PATCH 0/3] Add separate non-KMS state; constify struct drm_driver
This patchset moves legacy, non-KMS driver state from struct drm_driver into struct drm_legacy_state. Only non-KMS drivers provide an instance of the latter structure. One special case is nouveau, which supports legacy interfaces. It also provides an instance of the legacy state if the legacy interfaces have been enabled (i.e., defines the config option CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT) I
2017 Jul 20
0
[PATCH] drm: disable vblank only if it got previously enabled
...vers/gpu/drm/drm_vblank.c > > +++ b/drivers/gpu/drm/drm_vblank.c > > @@ -1140,8 +1140,11 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc) > > > > /* Avoid redundant vblank disables without previous > > * drm_crtc_vblank_on(). */ > > - if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) > > + if (drm_core_check_feature(dev, DRIVER_ATOMIC) || (!vblank->inmodeset && > > + vblank->enabled)) { > > + DRM_DEBUG("disabling vblank on crtc %u\n", pipe); > >...
2009 Dec 15
2
[PATCH 1/2] drm/nv04: Fix NV04 set_operation software method.
Signed-off-by: Marcin Ko?cielnicki <koriakin at 0x04.net> --- drivers/gpu/drm/nouveau/nv04_graph.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nv04_graph.c b/drivers/gpu/drm/nouveau/nv04_graph.c index 396ee92..d561d77 100644 --- a/drivers/gpu/drm/nouveau/nv04_graph.c +++ b/drivers/gpu/drm/nouveau/nv04_graph.c @@ -543,7 +543,7 @@
2017 Jul 20
0
[PATCH] drm: disable vblank only if it got previously enabled
...+++ b/drivers/gpu/drm/drm_vblank.c >>>> @@ -1140,8 +1140,11 @@ void drm_crtc_vblank_off(struct drm_crtc *crtc) >>>> >>>> /* Avoid redundant vblank disables without previous >>>> * drm_crtc_vblank_on(). */ >>>> - if (drm_core_check_feature(dev, DRIVER_ATOMIC) || !vblank->inmodeset) >>>> + if (drm_core_check_feature(dev, DRIVER_ATOMIC) || (!vblank->inmodeset && >>>> + vblank->enabled)) { >>>> + DRM_DEBUG("disabling vblank on crtc %u\n", p...
2016 May 27
2
[PATCH] Add virtio gpu driver.
...4 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3046,7 +3046,10 @@ static int drm_mode_cursor_common(struct drm_device *dev, */ drm_modeset_lock_crtc(crtc, crtc->cursor); if (crtc->cursor) { - ret = drm_mode_cursor_universal(crtc, req, file_priv); + if (drm_core_check_feature(DRIVER_ATOMIC)) + ret = drm_mode_cursor_atomic(crtc, req, file_priv); + else + ret = drm_mode_cursor_universal(crtc, req, file_priv); goto out; } drm_mode_cursor_atomic would simply be a fusing of drm_mode_cursor_universal + drm_atomic_helper_update_plane (dump all the intermedia...
2016 May 27
2
[PATCH] Add virtio gpu driver.
...4 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -3046,7 +3046,10 @@ static int drm_mode_cursor_common(struct drm_device *dev, */ drm_modeset_lock_crtc(crtc, crtc->cursor); if (crtc->cursor) { - ret = drm_mode_cursor_universal(crtc, req, file_priv); + if (drm_core_check_feature(DRIVER_ATOMIC)) + ret = drm_mode_cursor_atomic(crtc, req, file_priv); + else + ret = drm_mode_cursor_universal(crtc, req, file_priv); goto out; } drm_mode_cursor_atomic would simply be a fusing of drm_mode_cursor_universal + drm_atomic_helper_update_plane (dump all the intermedia...
2012 Dec 12
43
[PATCH 00/37] [RFC] revamped modeset locking
Hi all, First thing first: It works, I now no longer have a few dropped frames every 10s on my testbox here with the pageflip i-g-t tests. Random notes: - New design has per-crtc locks to protect the crtc input-side (pageflip, cursor) for r/w and the output state of the crtc (mode, dpms) as read-only. It also required completely revamped fb lifecycle management, those are now refcounted
2016 Dec 22
0
[PATCH v3 2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set
...<drm/drm_atomic.h> #include "drm_crtc_internal.h" @@ -273,7 +274,7 @@ int drm_object_property_get_value(struct drm_mode_object *obj, * their value in obj->properties->values[].. mostly to avoid * having to deal w/ EDID and similar props in atomic paths: */ - if (drm_core_check_feature(property->dev, DRIVER_ATOMIC) && + if (drm_drv_uses_atomic_modeset(property->dev) && !(property->flags & DRM_MODE_PROP_IMMUTABLE)) return drm_atomic_get_property(obj, property, val); -- 2.7.4
2016 Dec 21
0
[PATCH v2 2/2] drm: Get atomic property value even if DRIVER_ATOMIC is not set
...<drm/drm_atomic.h> #include "drm_crtc_internal.h" @@ -273,7 +274,7 @@ int drm_object_property_get_value(struct drm_mode_object *obj, * their value in obj->properties->values[].. mostly to avoid * having to deal w/ EDID and similar props in atomic paths: */ - if (drm_core_check_feature(property->dev, DRIVER_ATOMIC) && + if (drm_drv_uses_atomic_modeset(property->dev) && !(property->flags & DRM_MODE_PROP_IMMUTABLE)) return drm_atomic_get_property(obj, property, val); -- 2.7.4