Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 179873
b: refs/heads/master
c: 846975a
h: refs/heads/master
i:
  179871: d92c628
v: v3
  • Loading branch information
Marcin Slusarz authored and Ben Skeggs committed Jan 10, 2010
1 parent 6892a04 commit 7f286fe
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 61768bf1e694056cb41029b60e1270bf2578a83f
refs/heads/master: 846975a97b098bbbf1232a01a3a5723a4bddd9e7
15 changes: 11 additions & 4 deletions trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,7 @@ nouveau_fbcon_sync(struct fb_info *info)
return 0;

if (RING_SPACE(chan, 4)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
return 0;
}

Expand All @@ -86,8 +85,7 @@ nouveau_fbcon_sync(struct fb_info *info)
}

if (ret) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
return 0;
}

Expand Down Expand Up @@ -380,3 +378,12 @@ nouveau_fbcon_remove(struct drm_device *dev, struct drm_framebuffer *fb)

return 0;
}

void nouveau_fbcon_gpu_lockup(struct fb_info *info)
{
struct nouveau_fbcon_par *par = info->par;
struct drm_device *dev = par->dev;

NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
}
1 change: 1 addition & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_fbcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ void nouveau_fbcon_zfill(struct drm_device *dev);
int nv04_fbcon_accel_init(struct fb_info *info);
int nv50_fbcon_accel_init(struct fb_info *info);

void nouveau_fbcon_gpu_lockup(struct fb_info *info);
#endif /* __NV50_FBCON_H__ */

15 changes: 5 additions & 10 deletions trunk/drivers/gpu/drm/nouveau/nv04_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
return;

if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 4)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand All @@ -67,8 +66,7 @@ nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
return;

if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 7)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand Down Expand Up @@ -112,8 +110,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
}

if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 8)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand Down Expand Up @@ -147,8 +144,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
int iter_len = dsize > 128 ? 128 : dsize;

if (RING_SPACE(chan, iter_len + 1)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
cfb_imageblit(info, image);
return;
}
Expand Down Expand Up @@ -246,8 +242,7 @@ nv04_fbcon_accel_init(struct fb_info *info)
return ret;

if (RING_SPACE(chan, 49)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
return 0;
}

Expand Down
17 changes: 5 additions & 12 deletions trunk/drivers/gpu/drm/nouveau/nv50_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect)

if (!(info->flags & FBINFO_HWACCEL_DISABLED) &&
RING_SPACE(chan, rect->rop == ROP_COPY ? 7 : 11)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");

info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand Down Expand Up @@ -60,9 +58,7 @@ nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region)
return;

if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 12)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");

info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand Down Expand Up @@ -105,8 +101,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
}

if (!(info->flags & FBINFO_HWACCEL_DISABLED) && RING_SPACE(chan, 11)) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
}

if (info->flags & FBINFO_HWACCEL_DISABLED) {
Expand Down Expand Up @@ -139,9 +134,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
int push = dwords > 2047 ? 2047 : dwords;

if (RING_SPACE(chan, push + 1)) {
NV_ERROR(dev,
"GPU lockup - switching to software fbcon\n");
info->flags |= FBINFO_HWACCEL_DISABLED;
nouveau_fbcon_gpu_lockup(info);
cfb_imageblit(info, image);
return;
}
Expand Down Expand Up @@ -203,7 +196,7 @@ nv50_fbcon_accel_init(struct fb_info *info)

ret = RING_SPACE(chan, 59);
if (ret) {
NV_ERROR(dev, "GPU lockup - switching to software fbcon\n");
nouveau_fbcon_gpu_lockup(info);
return ret;
}

Expand Down

0 comments on commit 7f286fe

Please sign in to comment.