Displaying 20 results from an estimated 43 matches for "drm_modeset_unlock_all".
Did you mean:
drm_modeset_lock_all
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
2018 Dec 10
2
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...s, error code on failure.
- */
-int drm_crtc_force_disable_all(struct drm_device *dev)
-{
- struct drm_crtc *crtc;
- int ret = 0;
-
- drm_modeset_lock_all(dev);
- drm_for_each_crtc(crtc, dev)
- if (crtc->enabled) {
- ret = drm_crtc_force_disable(crtc);
- if (ret)
- goto out;
- }
-out:
- drm_modeset_unlock_all(dev);
- return ret;
-}
-EXPORT_SYMBOL(drm_crtc_force_disable_all);
-
static unsigned int drm_num_crtcs(struct drm_device *dev)
{
unsigned int num = 0;
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index a3c81850e755..23159eb494f1 100644
--- a/drivers/gpu/drm...
2018 Dec 11
1
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...lper.c b/drivers/gpu/drm/drm_crtc_helper.c
> > index a3c81850e755..23159eb494f1 100644
> > --- a/drivers/gpu/drm/drm_crtc_helper.c
> > +++ b/drivers/gpu/drm/drm_crtc_helper.c
> > @@ -984,3 +984,38 @@ void drm_helper_resume_force_mode(struct drm_device *dev)
> > drm_modeset_unlock_all(dev);
> > }
> > EXPORT_SYMBOL(drm_helper_resume_force_mode);
> > +
> > +/**
> > + * drm_helper_force_disable_all - Forcibly turn off all enabled CRTCs
> > + * @dev: DRM device whose CRTCs to turn off
> > + *
> > + * Drivers may want to call this on...
2018 Dec 10
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
..._lock_all(dev);
> - drm_for_each_crtc(crtc, dev)
> - if (crtc->enabled) {
> - ret = drm_crtc_force_disable(crtc);
> - if (ret)
> - goto out;
> - }
> -out:
> - drm_modeset_unlock_all(dev);
> - return ret;
> -}
> -EXPORT_SYMBOL(drm_crtc_force_disable_all);
> -
> static unsigned int drm_num_crtcs(struct drm_device *dev)
> {
> unsigned int num = 0;
> diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
> inde...
2018 Dec 17
0
[PATCH 4/7] drm: Move the legacy kms disable_all helper to crtc helpers
...s, error code on failure.
- */
-int drm_crtc_force_disable_all(struct drm_device *dev)
-{
- struct drm_crtc *crtc;
- int ret = 0;
-
- drm_modeset_lock_all(dev);
- drm_for_each_crtc(crtc, dev)
- if (crtc->enabled) {
- ret = drm_crtc_force_disable(crtc);
- if (ret)
- goto out;
- }
-out:
- drm_modeset_unlock_all(dev);
- return ret;
-}
-EXPORT_SYMBOL(drm_crtc_force_disable_all);
-
static unsigned int drm_num_crtcs(struct drm_device *dev)
{
unsigned int num = 0;
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index a3c81850e755..23159eb494f1 100644
--- a/drivers/gpu/drm...
2017 Nov 10
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...gt;fbcon)
+ {
+ NV_WARN(drm, "drm->fbcon of %s point to NULL. Will not register
connector\n",
+ connector->name);
+ return;
+ }
drm_modeset_lock_all(drm->dev);
drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
drm_modeset_unlock_all(drm->dev);
--
2.13.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 862 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/nouveau/attachments/20171110/dfd0ec9e/attachmen...
2017 Jun 20
2
[PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...ss)
return -EBUSY;
- drm_modeset_lock_all(dev);
+ if (cmap->start + cmap->len < cmap->start)
+ return -EINVAL;
+
+ drm_modeset_acquire_init(&ctx, 0);
+retry:
+ ret = drm_modeset_lock_all_ctx(dev, &ctx);
+ if (ret)
+ goto out;
if (!drm_fb_helper_is_bound(fb_helper)) {
- drm_modeset_unlock_all(dev);
- return -EBUSY;
+ ret = -EBUSY;
+ goto out;
}
for (i = 0; i < fb_helper->crtc_count; i++) {
crtc = fb_helper->crtc_info[i].mode_set.crtc;
- crtc_funcs = crtc->helper_private;
-
- red = cmap->red;
- green = cmap->green;
- blue = cmap->blue;
- transp = cma...
2017 Dec 03
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...oint to NULL. Will not register
>> connector\n",
>> + connector->name);
>> + return;
>> + }
>> drm_modeset_lock_all(drm->dev);
>> drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
>> drm_modeset_unlock_all(drm->dev);
>>
>>
>
> Hi,
>
> the patch looks OK to me, yet as noted in IRC, i'd like to have this
> patch split into two and have the ->fbcon check as a precondition to
> the 3D Controller part. But lets see what the other and more clever
> people think ab...
2018 May 02
0
[PATCH] drm/nouveau: Fix deadlock in nv50_mstm_register_connector()
...*mgr,
drm_connector_unregister(&mstc->connector);
- drm_modeset_lock_all(drm->dev);
drm_fb_helper_remove_one_connector(&drm->fbcon->helper, &mstc->connector);
+
+ drm_modeset_lock(&drm->dev->mode_config.connection_mutex, NULL);
mstc->port = NULL;
- drm_modeset_unlock_all(drm->dev);
+ drm_modeset_unlock(&drm->dev->mode_config.connection_mutex);
drm_connector_unreference(&mstc->connector);
}
@@ -3277,9 +3278,7 @@ nv50_mstm_register_connector(struct drm_connector *connector)
{
struct nouveau_drm *drm = nouveau_drm(connector->dev);
- dr...
2017 Jun 22
1
[PATCH v2 03/14] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
..., struct fb_info *info)
if (cmap->start + cmap->len < cmap->start)
return -EINVAL;
- drm_modeset_lock_all(dev);
+ drm_modeset_acquire_init(&ctx, 0);
+retry:
+ ret = drm_modeset_lock_all_ctx(dev, &ctx);
+ if (ret)
+ goto out;
if (!drm_fb_helper_is_bound(fb_helper)) {
- drm_modeset_unlock_all(dev);
- return -EBUSY;
+ ret = -EBUSY;
+ goto out;
}
for (i = 0; i < fb_helper->crtc_count; i++) {
- crtc = fb_helper->crtc_info[i].mode_set.crtc;
- crtc_funcs = crtc->helper_private;
-
- red = cmap->red;
- green = cmap->green;
- blue = cmap->blue;
- transp = cma...
2017 Jun 21
0
[PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...);
> + if (cmap->start + cmap->len < cmap->start)
> + return -EINVAL;
> +
> + drm_modeset_acquire_init(&ctx, 0);
> +retry:
> + ret = drm_modeset_lock_all_ctx(dev, &ctx);
> + if (ret)
> + goto out;
> if (!drm_fb_helper_is_bound(fb_helper)) {
> - drm_modeset_unlock_all(dev);
> - return -EBUSY;
> + ret = -EBUSY;
> + goto out;
> }
>
> for (i = 0; i < fb_helper->crtc_count; i++) {
> crtc = fb_helper->crtc_info[i].mode_set.crtc;
> - crtc_funcs = crtc->helper_private;
> -
> - red = cmap->red;
> - green = c...
2016 May 24
4
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
..._cleanup(struct drm_crtc *crtc)
> {
> struct drm_device *dev = crtc->dev;
>
> + if (crtc->enabled) {
> + struct drm_mode_set modeset = {
> + .crtc = crtc,
> + };
> +
> + drm_modeset_lock_all(dev);
> + drm_mode_set_config_internal(&modeset);
> + drm_modeset_unlock_all(dev);
> + }
> +
> kfree(crtc->gamma_store);
> crtc->gamma_store = NULL;
>
> --
> 2.8.1
>
> _______________________________________________
> Nouveau mailing list
> Nouveau at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nou...
2020 Jan 13
0
[PATCH RESEND] drm/nouveau: Add HD-audio component notifier support
...nouveau_drm(drm_dev);
+ struct drm_audio_component *acomp = data;
+
+ if (WARN_ON(!device_link_add(hda_kdev, kdev, DL_FLAG_STATELESS)))
+ return -ENOMEM;
+
+ drm_modeset_lock_all(drm_dev);
+ acomp->ops = &nv50_audio_component_ops;
+ acomp->dev = kdev;
+ drm->audio.component = acomp;
+ drm_modeset_unlock_all(drm_dev);
+ return 0;
+}
+
+static void
+nv50_audio_component_unbind(struct device *kdev, struct device *hda_kdev,
+ void *data)
+{
+ struct drm_device *drm_dev = dev_get_drvdata(kdev);
+ struct nouveau_drm *drm = nouveau_drm(drm_dev);
+ struct drm_audio_component *acomp = data;
+
+ drm_modes...
2017 Dec 14
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...n",
>>>> + connector->name);
>>>> + return;
>>>> + }
>>>> drm_modeset_lock_all(drm->dev);
>>>> drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
>>>> drm_modeset_unlock_all(drm->dev);
>>>>
>>>>
>>> Hi,
>>>
>>> the patch looks OK to me, yet as noted in IRC, i'd like to have this
>>> patch split into two and have the ->fbcon check as a precondition to
>>> the 3D Controller part. But lets see...
2016 May 24
5
[PATCH 0/9] Fix runtime pm ref leaks
In preparation for runtime pm on muxed dual GPU laptops,
I've fixed all runtime pm ref leaks I could find in nouveau,
radeon and amdgpu.
To ease reviewing, I've pushed this series to GitHub:
https://github.com/l1k/linux/commits/drm_runpm_fixes_v1
@Alex Deucher: I do not have an AMD GPU so couldn't test this
beyond verifying that it compiles. Please double-check the patches
and test
2017 Dec 18
2
[PATCH] Accept 3d controllers and not only VGA controllers.
...>name);
>>>>>> + return;
>>>>>> + }
>>>>>> drm_modeset_lock_all(drm->dev);
>>>>>> drm_fb_helper_add_one_connector(&drm->fbcon->helper,
>> connector);
>>>>>> drm_modeset_unlock_all(drm->dev);
>>>>>>
>>>>>>
>>>>> Hi,
>>>>>
>>>>> the patch looks OK to me, yet as noted in IRC, i'd like to have
>> this
>>>>> patch split into two and have the ->fbcon check as a precondit...
2016 May 24
0
[PATCH 9/9] drm: Turn off crtc before tearing down its data structure
...nabled,
+ * it is turned off first.
*/
void drm_crtc_cleanup(struct drm_crtc *crtc)
{
struct drm_device *dev = crtc->dev;
+ if (crtc->enabled) {
+ struct drm_mode_set modeset = {
+ .crtc = crtc,
+ };
+
+ drm_modeset_lock_all(dev);
+ drm_mode_set_config_internal(&modeset);
+ drm_modeset_unlock_all(dev);
+ }
+
kfree(crtc->gamma_store);
crtc->gamma_store = NULL;
--
2.8.1
2017 Jun 22
0
[PATCH v2 01/14] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap
...*green, *blue, *transp;
struct drm_crtc *crtc;
+ u16 *r, *g, *b;
int i, j, rc = 0;
int start;
if (oops_in_progress)
return -EBUSY;
+ if (cmap->start + cmap->len < cmap->start)
+ return -EINVAL;
+
drm_modeset_lock_all(dev);
if (!drm_fb_helper_is_bound(fb_helper)) {
drm_modeset_unlock_all(dev);
@@ -1245,6 +1249,29 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
transp = cmap->transp;
start = cmap->start;
+ if (info->fix.visual != FB_VISUAL_TRUECOLOR) {
+ if (!crtc->gamma_size) {
+ rc = -EINVAL;
+ goto out;
+ }
+
+ if (cmap-&g...
2017 Nov 11
0
[PATCH] Accept 3d controllers and not only VGA controllers.
..."drm->fbcon of %s point to NULL. Will not register
> connector\n",
> + connector->name);
> + return;
> + }
> drm_modeset_lock_all(drm->dev);
> drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
> drm_modeset_unlock_all(drm->dev);
>
>
Hi,
the patch looks OK to me, yet as noted in IRC, i'd like to have this
patch split into two and have the ->fbcon check as a precondition to the
3D Controller part. But lets see what the other and more clever people
think about it! :)
Greetings,
Tobias
2017 Dec 14
0
[PATCH] Accept 3d controllers and not only VGA controllers.
...>>> connector\n",
>>> + connector->name);
>>> + return;
>>> + }
>>> drm_modeset_lock_all(drm->dev);
>>> drm_fb_helper_add_one_connector(&drm->fbcon->helper, connector);
>>> drm_modeset_unlock_all(drm->dev);
>>>
>>>
>> Hi,
>>
>> the patch looks OK to me, yet as noted in IRC, i'd like to have this
>> patch split into two and have the ->fbcon check as a precondition to
>> the 3D Controller part. But lets see what the other and more clev...