Displaying 11 results from an estimated 11 matches for "oops_in_progress".
2019 Mar 26
1
[PATCH 14/21] drm/nouveau: Use drm_fb_helper_fill_info
...e nouveau acceleration. Cargo-cult says drm_can_sleep() is needed,
which isn't actually working if you pick a .config without PREEMPT.
For the generic fbdev defio support we've gone with offloading
everything to a worker. For the non-accel callbacks (set_par, blank
and friends) checking for oops_in_progress is good enough to catch all
the evil calling contexts.
v2: Rebase
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: nouveau at lists.freedesktop.org
---
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +------
drivers/gpu/drm/nouveau/nou...
2017 Jun 22
0
[PATCH v2 01/14] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap
...+ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1330,12 +1330,16 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
const struct drm_crtc_helper_funcs *crtc_funcs;
u16 *red, *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;
+
mutex_lock(&fb_helper->lock);
if (!drm_fb_helper_is_bound(fb_helper)) {
mutex_unlock(&fb_helper->lock);
@@ -1353,6 +1357,29 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, stru...
2017 Jun 22
0
[PATCH v2 01/14] drm/fb-helper: keep the .gamma_store updated in drm_fb_helper_setcmap
...+ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1223,12 +1223,16 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
const struct drm_crtc_helper_funcs *crtc_funcs;
u16 *red, *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)...
2019 Jan 24
0
[PATCH 17/26] drm/nouveau: Use drm_fb_helper_fill_info
...e nouveau acceleration. Cargo-cult says drm_can_sleep() is needed,
which isn't actually working if you pick a .config without PREEMPT.
For the generic fbdev defio support we've gone with offloading
everything to a worker. For the non-accel callbacks (set_par, blank
and friends) checking for oops_in_progress is good enough to catch all
the evil calling contexts.
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Ben Skeggs <bskeggs at redhat.com>
Cc: nouveau at lists.freedesktop.org
---
drivers/gpu/drm/nouveau/nouveau_fbcon.c | 7 +------
drivers/gpu/drm/nouveau/nouveau_fbcon.h...
2017 Jun 22
1
[PATCH v2 03/14] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...lper *fb_helper = info->par;
struct drm_device *dev = fb_helper->dev;
- const struct drm_crtc_helper_funcs *crtc_funcs;
- u16 *red, *green, *blue, *transp;
+ struct drm_modeset_acquire_ctx ctx;
struct drm_crtc *crtc;
u16 *r, *g, *b;
- int i, j, rc = 0;
- int start;
+ int i, ret;
if (oops_in_progress)
return -EBUSY;
@@ -1216,65 +1170,83 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, 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_c...
2017 Jun 20
2
[PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...lper *fb_helper = info->par;
struct drm_device *dev = fb_helper->dev;
- const struct drm_crtc_helper_funcs *crtc_funcs;
- u16 *red, *green, *blue, *transp;
+ struct drm_modeset_acquire_ctx ctx;
struct drm_crtc *crtc;
- int i, j, rc = 0;
- int start;
+ u16 *r, *g, *b;
+ int i, ret;
if (oops_in_progress)
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)) {
- dr...
2017 Jun 22
0
[PATCH v2 03/14] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...*fb_helper = info->par;
struct drm_device *dev = fb_helper->dev;
- const struct drm_crtc_helper_funcs *crtc_funcs;
- u16 *red, *green, *blue, *transp;
+ struct drm_modeset_acquire_ctx ctx;
struct drm_crtc *crtc;
u16 *r, *g, *b;
- int i, j, rc = 0;
- int start;
+ int i, ret = 0;
if (oops_in_progress)
return -EBUSY;
@@ -1329,61 +1283,82 @@ int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info)
return -EBUSY;
}
- drm_modeset_lock_all(dev);
- for (i = 0; i < fb_helper->crtc_count; i++) {
- crtc = fb_helper->crtc_info[i].mode_set.crtc;
- crtc_funcs = crtc->he...
2017 Jun 21
0
[PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...e *dev = fb_helper->dev;
> - const struct drm_crtc_helper_funcs *crtc_funcs;
> - u16 *red, *green, *blue, *transp;
> + struct drm_modeset_acquire_ctx ctx;
> struct drm_crtc *crtc;
> - int i, j, rc = 0;
> - int start;
> + u16 *r, *g, *b;
> + int i, ret;
>
> if (oops_in_progress)
> 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...
2017 Jun 22
22
[PATCH v2 00/14] improve the fb_setcmap helper
Hi!
While trying to get CLUT support for the atmel_hlcdc driver, and
specifically for the emulated fbdev interface, I received some
push-back that my feeble in-driver attempts should be solved
by the core. This is my attempt to do it right.
I have obviously not tested all of this with more than a compile,
but patches 1 and 3 are enough to make the atmel-hlcdc driver
do what I need (when patched
2017 Jun 21
2
[PATCH 01/11] drm/fb-helper: do a generic fb_setcmap helper in terms of crtc .gamma_set
...onst struct drm_crtc_helper_funcs *crtc_funcs;
>> - u16 *red, *green, *blue, *transp;
>> + struct drm_modeset_acquire_ctx ctx;
>> struct drm_crtc *crtc;
>> - int i, j, rc = 0;
>> - int start;
>> + u16 *r, *g, *b;
>> + int i, ret;
>>
>> if (oops_in_progress)
>> 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, &am...
2017 Jun 20
15
[PATCH 00/11] improve the fb_setcmap helper
Hi!
While trying to get CLUT support for the atmel_hlcdc driver, and
specifically for the emulated fbdev interface, I received some
push-back that my feeble in-driver attempts should be solved
by the core. This is my attempt to do it right.
Boris and Daniel, was this approximately what you had in mind?
I have obviously not tested all of this with more than a compile,
but the first patch is