search for: num_crtc

Displaying 20 results from an estimated 133 matches for "num_crtc".

2020 May 08
0
[RFC v4 03/12] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
....a4a9013584e2 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -491,16 +491,12 @@ static void vblank_disable_fn(struct timer_list *t) static void drm_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...
2020 Jun 22
0
[RFC v5 01/10] drm/vblank: Register drmm cleanup action once per drm_vblank_crtc
...ce5c1e1d29963 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -492,16 +492,12 @@ static void vblank_disable_fn(struct timer_list *t) static void drm_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; - drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && - drm_core_check_feature(dev, DRIVER_MODESET)); + drm_WARN_ON(dev, READ_ONCE(vblank->enabled) && +...
2013 Jul 22
0
[RFC PATCH] Support running nested in a Mir compositor
...14 deletions(-) diff --git a/src/nouveau_dri2.c b/src/nouveau_dri2.c index 3785956..2ad9932 100644 --- a/src/nouveau_dri2.c +++ b/src/nouveau_dri2.c @@ -267,7 +267,7 @@ can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) NVPtr pNv = NVPTR(scrn); int i; - if (!xf86_config->num_crtc) + if (xorgMir || !xf86_config->num_crtc) return FALSE; for (i = 0; i < xf86_config->num_crtc; i++) { @@ -290,7 +290,7 @@ can_sync_to_vblank(DrawablePtr draw) ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); NVPtr pNv = NVPTR(scrn); - return pNv->glx_vblank &&...
2013 Sep 08
3
3.12rc1-pre Nouveau? oops
...im in explicitly. The simplest explanation is that disp->init is > NULL. And it seems like there are no outputs from the earlier nouveau > init prints. I guess that the call to nouveau_display_resume from > nouveau_pmops_runtime_resume should be guarded by a if > (dev->mode_config.num_crtc) like it is everywhere else. > > -ilia Your guess was right, this (hopefully attached patch) fixes it for me! Thanks, Tobias
2017 Nov 10
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...rs/gpu/drm/nouveau/nouveau_fbcon.c index 2b12d82aac15..6b4d374a9d82 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev)      int preferred_bpp;      int ret;   -    if (!dev->mode_config.num_crtc || -        (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) +    if (!dev->mode_config.num_crtc)          return 0;        fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index f...
2017 Dec 03
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...b4d374a9d82 100644 >> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c >> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c >> @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev) >>       int preferred_bpp; >>       int ret; >>   -    if (!dev->mode_config.num_crtc || >> -        (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) >> +    if (!dev->mode_config.num_crtc) >>           return 0; >>         fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); >> diff --git a/drivers/gpu/drm/nouveau/nv50_display.c &...
2017 Mar 04
0
[DDX PATCH] Consider CRTCs disabled when DPMS is off
...-279,23 +279,27 @@ can_exchange(DrawablePtr draw, PixmapPtr dst_pix, PixmapPtr src_pix) ScrnInfoPtr scrn = xf86ScreenToScrn(draw->pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); NVPtr pNv = NVPTR(scrn); - int i; + int i, active_crtc_count = 0; if (!xf86_config->num_crtc) return FALSE; for (i = 0; i < xf86_config->num_crtc; i++) { xf86CrtcPtr crtc = xf86_config->crtc[i]; - if (crtc->enabled && crtc->rotatedData) - return FALSE; + if (drmmode_crtc_on(crtc)) { + if (crtc->rotatedData) + return FALSE; + active_crtc_coun...
2020 Jan 10
0
[PATCH 17/23] drm/radeon: Convert to CRTC VBLANK callbacks
...(struct drm_device *dev, int crtc) +int radeon_enable_vblank_kms(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; + unsigned int pipe = crtc->index; struct radeon_device *rdev = dev->dev_private; unsigned long irqflags; int r; - if (crtc < 0 || crtc >= rdev->num_crtc) { - DRM_ERROR("Invalid crtc %d\n", crtc); + if (pipe < 0 || pipe >= rdev->num_crtc) { + DRM_ERROR("Invalid crtc %d\n", pipe); return -EINVAL; } spin_lock_irqsave(&rdev->irq.lock, irqflags); - rdev->irq.crtc_vblank_int[crtc] = true; + rdev->irq.c...
2020 Jan 23
0
[PATCH v4 11/22] drm/radeon: Convert to CRTC VBLANK callbacks
...(struct drm_device *dev, int crtc) +int radeon_enable_vblank_kms(struct drm_crtc *crtc) { + struct drm_device *dev = crtc->dev; + unsigned int pipe = crtc->index; struct radeon_device *rdev = dev->dev_private; unsigned long irqflags; int r; - if (crtc < 0 || crtc >= rdev->num_crtc) { - DRM_ERROR("Invalid crtc %d\n", crtc); + if (pipe < 0 || pipe >= rdev->num_crtc) { + DRM_ERROR("Invalid crtc %d\n", pipe); return -EINVAL; } spin_lock_irqsave(&rdev->irq.lock, irqflags); - rdev->irq.crtc_vblank_int[crtc] = true; + rdev->irq.c...
2017 Dec 14
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...pu/drm/nouveau/nouveau_fbcon.c >>>> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c >>>> @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev) >>>> int preferred_bpp; >>>> int ret; >>>> - if (!dev->mode_config.num_crtc || >>>> - (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) >>>> + if (!dev->mode_config.num_crtc) >>>> return 0; >>>> fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); >>>> diff --git...
2013 Sep 08
3
3.12rc1-pre Nouveau? oops
...xplanation is that disp->init is >>> NULL. And it seems like there are no outputs from the earlier nouveau >>> init prints. I guess that the call to nouveau_display_resume from >>> nouveau_pmops_runtime_resume should be guarded by a if >>> (dev->mode_config.num_crtc) like it is everywhere else. >>> >>> -ilia >> Your guess was right, this (hopefully attached patch) fixes it for me! > Does it look like this one? > > Dave. No, mine was quick and dirty, reverted it and took yours. But i'm a little bit confused that this is...
2012 Apr 25
2
[PATCH 1/2] drm/nouveau: Use drm_vblank_count_and_time() for pageflip completion events.
From: Mario Kleiner <mario.kleiner at tuebingen.mpg.de> Emit kms pageflip completion events with proper vblank count and timestamp for the vblank interval in which the pageflip completed. This makes the timestamps and counts consistent with what the OML_sync_control spec defines. v2 Lucas Stach: rebased on top of nouveau tree and resolved trivial conflict. Signed-off-by: Mario Kleiner
2017 Dec 18
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...gt;>>> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c >>>>>> @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev) >>>>>> int preferred_bpp; >>>>>> int ret; >>>>>> - if (!dev->mode_config.num_crtc || >>>>>> - (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) >>>>>> + if (!dev->mode_config.num_crtc) >>>>>> return 0; >>>>>> fbcon = kzalloc(sizeof(struct nouveau_fbdev), >>...
2017 Jun 21
6
Enable vblank_disable_immediate on more drivers.
This patch series sets dev->vblank_disable_immediate = true on radeon/amdgpu-kms, nouveau-kms for nv50+, and vc4 for the real kms driver (as opposed to dispmanx firmware backed kms). All the drivers should be ready in theory, given their implementation, for fast vblank disable/enable. In practice, i have performed timing tests with my measurement equipment for all those drivers with the
2017 Nov 11
0
[PATCH] Accept 3d controllers and not only VGA controllers.
...ex 2b12d82aac15..6b4d374a9d82 100644 > --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c > +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c > @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev) >      int preferred_bpp; >      int ret; > > -    if (!dev->mode_config.num_crtc || > -        (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) > +    if (!dev->mode_config.num_crtc) >          return 0; > >      fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); > diff --git a/drivers/gpu/drm/nouveau/nv50_display.c > b/drivers/...
2018 Mar 01
1
[PATCH] Fix colormap handling at screen depth 30.
...d, 2 insertions(+), 2 deletions(-) diff --git a/src/nv_driver.c b/src/nv_driver.c index 32062eb..4fcd4c1 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -1568,8 +1568,8 @@ NVScreenInit(SCREEN_INIT_ARGS_DECL) * Must follow initialization of the default colormap */ if (xf86_config->num_crtc && - !xf86HandleColormaps(pScreen, 256, 8, NVLoadPalette, - NULL, CMAP_PALETTED_TRUECOLOR)) + !xf86HandleColormaps(pScreen, 1 << pScrn->rgbBits, pScrn->rgbBits, + NVLoadPalette, NULL, CMAP_PALETTED_TRUECOLOR)) return FALSE; /* Report any unused options (on...
2018 Jun 12
0
[PATCH] Fix colormap handling at screen depth 30. (v2)
...- * Must follow initialization of the default colormap + * Must follow initialization of the default colormap. + * X-Server < 1.20 mishandles > 256 slots / > 8 bpc color maps, so skip + * color map setup on old servers at > 8 bpc. Gamma luts still work. */ - if (xf86_config->num_crtc && - !xf86HandleColormaps(pScreen, 256, 8, NVLoadPalette, - NULL, CMAP_PALETTED_TRUECOLOR)) + if (xf86_config->num_crtc && (pScrn->rgbBits <= 8 || + XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,20,0,0,0)) && + !xf86HandleColormaps(pScreen, 1 &lt...
2018 Aug 07
0
[PATCH v5 07/13] drm/nouveau: Add missing unroll functions in nouveau_do_suspend()
.../drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index 5ea8fe992484..db56e9b6b6af 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -674,10 +674,11 @@ nouveau_do_suspend(struct drm_device *dev, bool runtime) if (dev->mode_config.num_crtc) { NV_DEBUG(drm, "suspending console...\n"); nouveau_fbcon_set_suspend(dev, 1); + NV_DEBUG(drm, "suspending display...\n"); ret = nouveau_display_suspend(dev, runtime); if (ret) - return ret; + goto fail_fbcon; } NV_DEBUG(drm, "evicting buffers...\n...
2017 Dec 14
0
[PATCH] Accept 3d controllers and not only VGA controllers.
...> --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c >>> +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c >>> @@ -498,8 +498,7 @@ nouveau_fbcon_init(struct drm_device *dev) >>>       int preferred_bpp; >>>       int ret; >>>   -    if (!dev->mode_config.num_crtc || >>> -        (dev->pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA) >>> +    if (!dev->mode_config.num_crtc) >>>           return 0; >>>         fbcon = kzalloc(sizeof(struct nouveau_fbdev), GFP_KERNEL); >>> diff --git a/drivers/gpu/drm/no...
2020 Mar 18
4
[PATCH 1/9] drm/vblank: Add vblank works
..._timer_sync(&vblank->disable_timer); > + > + wake_up_all(&vblank->vblank_work.work_wait); > + kthread_stop(vblank->vblank_work.thread); > } > > kfree(dev->vblank); > @@ -447,6 +453,108 @@ void drm_vblank_cleanup(struct drm_device *dev) > dev->num_crtcs = 0; > } > > +static int vblank_work_thread(void *data) > +{ > + struct drm_vblank_crtc *vblank = data; > + > + while (!kthread_should_stop()) { > + struct drm_vblank_work *work, *next; > + LIST_HEAD(list); > + u64 count; > + int ret; > + > + spin_loc...