* vt/fbcon binding and handover fixes
@ 2010-12-21 1:41 ` Dave Airlie
0 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel
I've been working on some issues with the fb handoff between vesafb and KMS
on my machine with a dual-gpu card. These 3 patches are the primary result
of this, to fix a number of issues where the VT layer and fbcon layers
got themselves into a place that they couldn't get out off, having the second
card complicates things nicely where we have an fbdev registered but fbcon
gets unbound to the dummy console and can't get back.
Also a fix to the overlap tests which had an off-by-one.
Dave.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, linux-kernel, dri-devel
From: Dave Airlie <airlied@redhat.com>
On my system with a radeon x2, the first GPU was not overlapping vesa
but the test decided it was.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/fbmem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0e6aa3d..4ac1201 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
if (gen->base == hw->base)
return true;
/* is the generic aperture base inside the hw base->hw base+size */
- if (gen->base > hw->base && gen->base <= hw->base + hw->size)
+ if (gen->base > hw->base && gen->base < hw->base + hw->size)
return true;
return false;
}
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
(?)
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, linux-kernel, dri-devel
From: Dave Airlie <airlied@redhat.com>
On my system with a radeon x2, the first GPU was not overlapping vesa
but the test decided it was.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/fbmem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0e6aa3d..4ac1201 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
if (gen->base == hw->base)
return true;
/* is the generic aperture base inside the hw base->hw base+size */
- if (gen->base > hw->base && gen->base <= hw->base + hw->size)
+ if (gen->base > hw->base && gen->base < hw->base + hw->size)
return true;
return false;
}
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
On my system with a radeon x2, the first GPU was not overlapping vesa
but the test decided it was.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/fbmem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0e6aa3d..4ac1201 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
if (gen->base = hw->base)
return true;
/* is the generic aperture base inside the hw base->hw base+size */
- if (gen->base > hw->base && gen->base <= hw->base + hw->size)
+ if (gen->base > hw->base && gen->base < hw->base + hw->size)
return true;
return false;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 1/3] fb: fix overlapping test off-by-one.
@ 2010-12-21 1:41 ` Dave Airlie
0 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
On my system with a radeon x2, the first GPU was not overlapping vesa
but the test decided it was.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/fbmem.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 0e6aa3d..4ac1201 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
if (gen->base == hw->base)
return true;
/* is the generic aperture base inside the hw base->hw base+size */
- if (gen->base > hw->base && gen->base <= hw->base + hw->size)
+ if (gen->base > hw->base && gen->base < hw->base + hw->size)
return true;
return false;
}
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
(?)
@ 2010-12-21 7:29 ` Michel Dänzer
-1 siblings, 0 replies; 30+ messages in thread
From: Michel Dänzer @ 2010-12-21 7:29 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> On my system with a radeon x2, the first GPU was not overlapping vesa
> but the test decided it was.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/video/fbmem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 0e6aa3d..4ac1201 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> if (gen->base == hw->base)
> return true;
> /* is the generic aperture base inside the hw base->hw base+size */
> - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> + if (gen->base > hw->base && gen->base < hw->base + hw->size)
Good catch.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
(?)
(?)
@ 2010-12-21 7:29 ` Michel Dänzer
-1 siblings, 0 replies; 30+ messages in thread
From: Michel Dänzer @ 2010-12-21 7:29 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> On my system with a radeon x2, the first GPU was not overlapping vesa
> but the test decided it was.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/video/fbmem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 0e6aa3d..4ac1201 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> if (gen->base == hw->base)
> return true;
> /* is the generic aperture base inside the hw base->hw base+size */
> - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> + if (gen->base > hw->base && gen->base < hw->base + hw->size)
Good catch.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 1:41 ` Dave Airlie
@ 2010-12-21 7:29 ` Michel Dänzer
-1 siblings, 0 replies; 30+ messages in thread
From: Michel Dänzer @ 2010-12-21 7:29 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-fbdev, Dave Airlie, linux-kernel, dri-devel
On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> On my system with a radeon x2, the first GPU was not overlapping vesa
> but the test decided it was.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/video/fbmem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 0e6aa3d..4ac1201 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> if (gen->base = hw->base)
> return true;
> /* is the generic aperture base inside the hw base->hw base+size */
> - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> + if (gen->base > hw->base && gen->base < hw->base + hw->size)
Good catch.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
@ 2010-12-21 7:29 ` Michel Dänzer
0 siblings, 0 replies; 30+ messages in thread
From: Michel Dänzer @ 2010-12-21 7:29 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-fbdev, Dave Airlie, linux-kernel, dri-devel
On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> On my system with a radeon x2, the first GPU was not overlapping vesa
> but the test decided it was.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/video/fbmem.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> index 0e6aa3d..4ac1201 100644
> --- a/drivers/video/fbmem.c
> +++ b/drivers/video/fbmem.c
> @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> if (gen->base == hw->base)
> return true;
> /* is the generic aperture base inside the hw base->hw base+size */
> - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> + if (gen->base > hw->base && gen->base < hw->base + hw->size)
Good catch.
Reviewed-by: Michel Dänzer <michel@daenzer.net>
--
Earthling Michel Dänzer | http://www.vmware.com
Libre software enthusiast | Debian, X and DRI developer
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 7:29 ` Michel Dänzer
@ 2010-12-24 3:28 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:28 UTC (permalink / raw)
To: Michel D?nzer
Cc: Dave Airlie, linux-fbdev, Dave Airlie, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 08:29:03AM +0100, Michel D?nzer wrote:
> On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> >
> > On my system with a radeon x2, the first GPU was not overlapping vesa
> > but the test decided it was.
> >
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> > ---
> > drivers/video/fbmem.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> > index 0e6aa3d..4ac1201 100644
> > --- a/drivers/video/fbmem.c
> > +++ b/drivers/video/fbmem.c
> > @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> > if (gen->base = hw->base)
> > return true;
> > /* is the generic aperture base inside the hw base->hw base+size */
> > - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> > + if (gen->base > hw->base && gen->base < hw->base + hw->size)
>
> Good catch.
>
> Reviewed-by: Michel D??nzer <michel@daenzer.net>
>
I'll queue this for .37, thanks.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
@ 2010-12-24 3:28 ` Paul Mundt
0 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:28 UTC (permalink / raw)
To: Michel D?nzer
Cc: Dave Airlie, linux-fbdev, Dave Airlie, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 08:29:03AM +0100, Michel D?nzer wrote:
> On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> >
> > On my system with a radeon x2, the first GPU was not overlapping vesa
> > but the test decided it was.
> >
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> > ---
> > drivers/video/fbmem.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> > index 0e6aa3d..4ac1201 100644
> > --- a/drivers/video/fbmem.c
> > +++ b/drivers/video/fbmem.c
> > @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> > if (gen->base == hw->base)
> > return true;
> > /* is the generic aperture base inside the hw base->hw base+size */
> > - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> > + if (gen->base > hw->base && gen->base < hw->base + hw->size)
>
> Good catch.
>
> Reviewed-by: Michel D??nzer <michel@daenzer.net>
>
I'll queue this for .37, thanks.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 7:29 ` Michel Dänzer
(?)
(?)
@ 2010-12-24 3:28 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:28 UTC (permalink / raw)
To: Michel D?nzer; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 08:29:03AM +0100, Michel D?nzer wrote:
> On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> >
> > On my system with a radeon x2, the first GPU was not overlapping vesa
> > but the test decided it was.
> >
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> > ---
> > drivers/video/fbmem.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> > index 0e6aa3d..4ac1201 100644
> > --- a/drivers/video/fbmem.c
> > +++ b/drivers/video/fbmem.c
> > @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> > if (gen->base == hw->base)
> > return true;
> > /* is the generic aperture base inside the hw base->hw base+size */
> > - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> > + if (gen->base > hw->base && gen->base < hw->base + hw->size)
>
> Good catch.
>
> Reviewed-by: Michel D??nzer <michel@daenzer.net>
>
I'll queue this for .37, thanks.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
--
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 1/3] fb: fix overlapping test off-by-one.
2010-12-21 7:29 ` Michel Dänzer
` (2 preceding siblings ...)
(?)
@ 2010-12-24 3:28 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:28 UTC (permalink / raw)
To: Michel D?nzer; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 08:29:03AM +0100, Michel D?nzer wrote:
> On Die, 2010-12-21 at 11:41 +1000, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> >
> > On my system with a radeon x2, the first GPU was not overlapping vesa
> > but the test decided it was.
> >
> > Signed-off-by: Dave Airlie <airlied@redhat.com>
> > ---
> > drivers/video/fbmem.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
> > index 0e6aa3d..4ac1201 100644
> > --- a/drivers/video/fbmem.c
> > +++ b/drivers/video/fbmem.c
> > @@ -1458,7 +1458,7 @@ static bool apertures_overlap(struct aperture *gen, struct aperture *hw)
> > if (gen->base == hw->base)
> > return true;
> > /* is the generic aperture base inside the hw base->hw base+size */
> > - if (gen->base > hw->base && gen->base <= hw->base + hw->size)
> > + if (gen->base > hw->base && gen->base < hw->base + hw->size)
>
> Good catch.
>
> Reviewed-by: Michel D??nzer <michel@daenzer.net>
>
I'll queue this for .37, thanks.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH] Update fbdev fb_fix_screeninfo
2010-12-21 1:41 ` Dave Airlie
` (3 preceding siblings ...)
(?)
@ 2010-12-23 16:40 ` James Simmons
-1 siblings, 0 replies; 30+ messages in thread
From: James Simmons @ 2010-12-23 16:40 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, dri-devel
If you change the color depth via fbset or some other framebuffer aware
userland application struct fb_fix_screeninfo is not updated to this new
information. This patch fixes this issue. Also the function is changed to
just pass in struct drm_framebuffer so in the future we could use more
fields. I'm hoping some day fix->smem* could be set here :-)
Signed-off-by: James Simmons <jsimmons@infradead.org>
diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 5c4f9b9..0307d60 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -607,6 +607,25 @@ void drm_fb_helper_fini(struct drm_fb_helper *fb_helper)
}
EXPORT_SYMBOL(drm_fb_helper_fini);
+void drm_fb_helper_fill_fix(struct fb_info *info, struct drm_framebuffer *fb)
+{
+ info->fix.type = FB_TYPE_PACKED_PIXELS;
+ info->fix.visual = fb->depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
+ FB_VISUAL_TRUECOLOR;
+ info->fix.mmio_start = 0;
+ info->fix.mmio_len = 0;
+ info->fix.type_aux = 0;
+ info->fix.xpanstep = 1; /* doing it in hw */
+ info->fix.ypanstep = 1; /* doing it in hw */
+ info->fix.ywrapstep = 0;
+ info->fix.accel = FB_ACCEL_NONE;
+ info->fix.type_aux = 0;
+
+ info->fix.line_length = fb->pitch;
+ return;
+}
+EXPORT_SYMBOL(drm_fb_helper_fill_fix);
+
static int setcolreg(struct drm_crtc *crtc, u16 red, u16 green,
u16 blue, u16 regno, struct fb_info *info)
{
@@ -816,6 +835,7 @@ int drm_fb_helper_set_par(struct fb_info *info)
mutex_unlock(&dev->mode_config.mutex);
return ret;
}
+ drm_fb_helper_fill_fix(info, fb_helper->fb);
}
mutex_unlock(&dev->mode_config.mutex);
@@ -953,6 +973,7 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
if (new_fb) {
info->var.pixclock = 0;
+ drm_fb_helper_fill_fix(info, fb_helper->fb);
if (register_framebuffer(info) < 0) {
return -EINVAL;
}
@@ -979,26 +1000,6 @@ int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
}
EXPORT_SYMBOL(drm_fb_helper_single_fb_probe);
-void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
- uint32_t depth)
-{
- info->fix.type = FB_TYPE_PACKED_PIXELS;
- info->fix.visual = depth == 8 ? FB_VISUAL_PSEUDOCOLOR :
- FB_VISUAL_TRUECOLOR;
- info->fix.mmio_start = 0;
- info->fix.mmio_len = 0;
- info->fix.type_aux = 0;
- info->fix.xpanstep = 1; /* doing it in hw */
- info->fix.ypanstep = 1; /* doing it in hw */
- info->fix.ywrapstep = 0;
- info->fix.accel = FB_ACCEL_NONE;
- info->fix.type_aux = 0;
-
- info->fix.line_length = pitch;
- return;
-}
-EXPORT_SYMBOL(drm_fb_helper_fill_fix);
-
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
uint32_t fb_width, uint32_t fb_height)
{
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c
index 67738f3..701e830 100644
--- a/drivers/gpu/drm/i915/intel_fb.c
+++ b/drivers/gpu/drm/i915/intel_fb.c
@@ -150,7 +150,6 @@ static int intelfb_create(struct intel_fbdev *ifbdev,
// memset(info->screen_base, 0, size);
- drm_fb_helper_fill_fix(info, fb->pitch, fb->depth);
drm_fb_helper_fill_var(info, &ifbdev->helper, sizes->fb_width, sizes->fb_height);
info->pixmap.size = 64*1024;
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 6d56a54..a26d047 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -359,7 +359,6 @@ nouveau_fbcon_create(struct nouveau_fbdev *nfbdev,
info->screen_base = nvbo_kmap_obj_iovirtual(nouveau_fb->nvbo);
info->screen_size = size;
- drm_fb_helper_fill_fix(info, fb->pitch, fb->depth);
drm_fb_helper_fill_var(info, &nfbdev->helper, sizes->fb_width, sizes->fb_height);
/* Set aperture base/size for vesafb takeover */
diff --git a/drivers/gpu/drm/radeon/radeon_fb.c b/drivers/gpu/drm/radeon/radeon_fb.c
index f7b4762..80c1c7a 100644
--- a/drivers/gpu/drm/radeon/radeon_fb.c
+++ b/drivers/gpu/drm/radeon/radeon_fb.c
@@ -225,8 +225,6 @@ static int radeonfb_create(struct radeon_fbdev *rfbdev,
strcpy(info->fix.id, "radeondrmfb");
- drm_fb_helper_fill_fix(info, fb->pitch, fb->depth);
-
info->flags = FBINFO_DEFAULT | FBINFO_CAN_FORCE_OUTPUT;
info->fbops = &radeonfb_ops;
diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index f22e7fe..aac27bd 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -121,9 +121,6 @@ int drm_fb_helper_setcolreg(unsigned regno,
void drm_fb_helper_restore(void);
void drm_fb_helper_fill_var(struct fb_info *info, struct drm_fb_helper *fb_helper,
uint32_t fb_width, uint32_t fb_height);
-void drm_fb_helper_fill_fix(struct fb_info *info, uint32_t pitch,
- uint32_t depth);
-
int drm_fb_helper_setcmap(struct fb_cmap *cmap, struct fb_info *info);
bool drm_fb_helper_hotplug_event(struct drm_fb_helper *fb_helper);
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2010-12-21 1:41 ` Dave Airlie
` (3 preceding siblings ...)
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, Greg KH, linux-kernel, Alan Cox, dri-devel
From: Dave Airlie <airlied@redhat.com>
With framebuffer handover and multiple GPUs, we get into a
position where the fbcon unbinds the vesafb framebuffer for GPU 1,
but we still have a radeon framebuffer bound from GPU 0, so
we don't unregister the console driver. Then when we tried to bind
the new radeon framebuffer for GPU1 we never get to the bind
call as we fail due to the console being registered already.
This changes the return value to -EBUSY when the driver is
already registered and continues to bind for -EBUSY.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@suse.de>
---
drivers/tty/vt/vt.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index a8ec48e..d781496 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
/* already registered */
if (con_driver->con == csw)
- retval = -EINVAL;
+ retval = -EBUSY;
}
if (retval)
@@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
int err;
err = register_con_driver(csw, first, last);
-
+ /* if we get an busy error we still want to bind the console driver
+ * and return success, as we may have unbound the console driver
+ * but not unregistered it.
+ */
+ if (err == -EBUSY)
+ err = 0;
if (!err)
bind_con_driver(csw, first, last, deflt);
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2010-12-21 1:41 ` Dave Airlie
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie, Alan Cox, Greg KH
From: Dave Airlie <airlied@redhat.com>
With framebuffer handover and multiple GPUs, we get into a
position where the fbcon unbinds the vesafb framebuffer for GPU 1,
but we still have a radeon framebuffer bound from GPU 0, so
we don't unregister the console driver. Then when we tried to bind
the new radeon framebuffer for GPU1 we never get to the bind
call as we fail due to the console being registered already.
This changes the return value to -EBUSY when the driver is
already registered and continues to bind for -EBUSY.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@suse.de>
---
drivers/tty/vt/vt.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index a8ec48e..d781496 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
/* already registered */
if (con_driver->con = csw)
- retval = -EINVAL;
+ retval = -EBUSY;
}
if (retval)
@@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
int err;
err = register_con_driver(csw, first, last);
-
+ /* if we get an busy error we still want to bind the console driver
+ * and return success, as we may have unbound the console driver
+ * but not unregistered it.
+ */
+ if (err = -EBUSY)
+ err = 0;
if (!err)
bind_con_driver(csw, first, last, deflt);
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread
* [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
@ 2010-12-21 1:41 ` Dave Airlie
0 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie, Alan Cox, Greg KH
From: Dave Airlie <airlied@redhat.com>
With framebuffer handover and multiple GPUs, we get into a
position where the fbcon unbinds the vesafb framebuffer for GPU 1,
but we still have a radeon framebuffer bound from GPU 0, so
we don't unregister the console driver. Then when we tried to bind
the new radeon framebuffer for GPU1 we never get to the bind
call as we fail due to the console being registered already.
This changes the return value to -EBUSY when the driver is
already registered and continues to bind for -EBUSY.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@suse.de>
---
drivers/tty/vt/vt.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index a8ec48e..d781496 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
/* already registered */
if (con_driver->con == csw)
- retval = -EINVAL;
+ retval = -EBUSY;
}
if (retval)
@@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
int err;
err = register_con_driver(csw, first, last);
-
+ /* if we get an busy error we still want to bind the console driver
+ * and return success, as we may have unbound the console driver
+ * but not unregistered it.
+ */
+ if (err == -EBUSY)
+ err = 0;
if (!err)
bind_con_driver(csw, first, last, deflt);
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread
* Re: [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2010-12-21 1:41 ` Dave Airlie
(?)
@ 2011-01-06 23:57 ` Dave Airlie
2011-01-07 0:50 ` Greg KH
-1 siblings, 1 reply; 30+ messages in thread
From: Dave Airlie @ 2011-01-06 23:57 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, Dave Airlie, Alan Cox, Greg KH
Hi Greg,
here is the patch I think you missed.
Dave.
On Tue, Dec 21, 2010 at 11:41 AM, Dave Airlie <airlied@gmail.com> wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> With framebuffer handover and multiple GPUs, we get into a
> position where the fbcon unbinds the vesafb framebuffer for GPU 1,
> but we still have a radeon framebuffer bound from GPU 0, so
> we don't unregister the console driver. Then when we tried to bind
> the new radeon framebuffer for GPU1 we never get to the bind
> call as we fail due to the console being registered already.
>
> This changes the return value to -EBUSY when the driver is
> already registered and continues to bind for -EBUSY.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
> Cc: Greg KH <greg@suse.de>
> ---
> drivers/tty/vt/vt.c | 9 +++++++--
> 1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
> index a8ec48e..d781496 100644
> --- a/drivers/tty/vt/vt.c
> +++ b/drivers/tty/vt/vt.c
> @@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
>
> /* already registered */
> if (con_driver->con == csw)
> - retval = -EINVAL;
> + retval = -EBUSY;
> }
>
> if (retval)
> @@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
> int err;
>
> err = register_con_driver(csw, first, last);
> -
> + /* if we get an busy error we still want to bind the console driver
> + * and return success, as we may have unbound the console driver
> + * but not unregistered it.
> + */
> + if (err == -EBUSY)
> + err = 0;
> if (!err)
> bind_con_driver(csw, first, last, deflt);
>
> --
> 1.7.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2011-01-06 23:57 ` Dave Airlie
@ 2011-01-07 0:50 ` Greg KH
2011-01-07 0:52 ` Dave Airlie
0 siblings, 1 reply; 30+ messages in thread
From: Greg KH @ 2011-01-07 0:50 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-kernel, Dave Airlie, Alan Cox, Greg KH
On Fri, Jan 07, 2011 at 09:57:41AM +1000, Dave Airlie wrote:
> Hi Greg,
>
> here is the patch I think you missed.
Ah, thanks, I did. I'll queue this up for after .38-rc1 is out as it's
a bug fix. It should go to -stable as well for .37 right?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2011-01-07 0:50 ` Greg KH
@ 2011-01-07 0:52 ` Dave Airlie
0 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2011-01-07 0:52 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, Alan Cox, Greg KH
On Thu, 2011-01-06 at 16:50 -0800, Greg KH wrote:
> On Fri, Jan 07, 2011 at 09:57:41AM +1000, Dave Airlie wrote:
> > Hi Greg,
> >
> > here is the patch I think you missed.
>
> Ah, thanks, I did. I'll queue this up for after .38-rc1 is out as it's
> a bug fix. It should go to -stable as well for .37 right?
Yup, sounds like it should.
Dave.
^ permalink raw reply [flat|nested] 30+ messages in thread
* [PATCH 2/3] vt: fix issue when fbcon wants to takeover a second time.
2010-12-21 1:41 ` Dave Airlie
` (5 preceding siblings ...)
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, Greg KH, linux-kernel, dri-devel
From: Dave Airlie <airlied@redhat.com>
With framebuffer handover and multiple GPUs, we get into a
position where the fbcon unbinds the vesafb framebuffer for GPU 1,
but we still have a radeon framebuffer bound from GPU 0, so
we don't unregister the console driver. Then when we tried to bind
the new radeon framebuffer for GPU1 we never get to the bind
call as we fail due to the console being registered already.
This changes the return value to -EBUSY when the driver is
already registered and continues to bind for -EBUSY.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <greg@suse.de>
---
drivers/tty/vt/vt.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index a8ec48e..d781496 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -3524,7 +3524,7 @@ int register_con_driver(const struct consw *csw, int first, int last)
/* already registered */
if (con_driver->con == csw)
- retval = -EINVAL;
+ retval = -EBUSY;
}
if (retval)
@@ -3635,7 +3635,12 @@ int take_over_console(const struct consw *csw, int first, int last, int deflt)
int err;
err = register_con_driver(csw, first, last);
-
+ /* if we get an busy error we still want to bind the console driver
+ * and return success, as we may have unbound the console driver
+ * but not unregistered it.
+ */
+ if (err == -EBUSY)
+ err = 0;
if (!err)
bind_con_driver(csw, first, last, deflt);
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
` (6 preceding siblings ...)
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, linux-kernel, dri-devel
From: Dave Airlie <airlied@redhat.com>
Situation as follow:
2 GPUs + vesafb + kms.
GPU 1 is primary, vesafb binds to it as fb0
radeon loads
GPU 0 loads as fb1
GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
console, which causes the dummy console to rebind.
this means fbcon_deinit gets called, which calls fbcon_exit
since the console isn't bound anymore and we set fbcon_has_exited.
GPU 1 creates a new fb0 which is primary and we want to be console.
fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
however as fbcon_has_exited is set nothing further ever happens.
This patch bypasses the fbcon_has_exited and checks if the console is unbound,
if its unbound it calls the fbcon_takeover which calls the vt layer to
call the fbcon_startup method and everthing works.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/console/fbcon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 7ccc967..6662687 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (oldidx == newidx)
return 0;
- if (!info || fbcon_has_exited)
+ if (!info)
return -EINVAL;
- if (!err && !search_for_mapped_con()) {
+ if (!search_for_mapped_con() || !con_is_bound(&fb_con)) {
info_idx = newidx;
return fbcon_takeover(0);
}
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
` (7 preceding siblings ...)
(?)
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: Dave Airlie, linux-kernel, dri-devel
From: Dave Airlie <airlied@redhat.com>
Situation as follow:
2 GPUs + vesafb + kms.
GPU 1 is primary, vesafb binds to it as fb0
radeon loads
GPU 0 loads as fb1
GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
console, which causes the dummy console to rebind.
this means fbcon_deinit gets called, which calls fbcon_exit
since the console isn't bound anymore and we set fbcon_has_exited.
GPU 1 creates a new fb0 which is primary and we want to be console.
fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
however as fbcon_has_exited is set nothing further ever happens.
This patch bypasses the fbcon_has_exited and checks if the console is unbound,
if its unbound it calls the fbcon_takeover which calls the vt layer to
call the fbcon_startup method and everthing works.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/console/fbcon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 7ccc967..6662687 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (oldidx == newidx)
return 0;
- if (!info || fbcon_has_exited)
+ if (!info)
return -EINVAL;
- if (!err && !search_for_mapped_con()) {
+ if (!search_for_mapped_con() || !con_is_bound(&fb_con)) {
info_idx = newidx;
return fbcon_takeover(0);
}
--
1.7.1
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
@ 2010-12-21 1:41 ` Dave Airlie
-1 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
Situation as follow:
2 GPUs + vesafb + kms.
GPU 1 is primary, vesafb binds to it as fb0
radeon loads
GPU 0 loads as fb1
GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
console, which causes the dummy console to rebind.
this means fbcon_deinit gets called, which calls fbcon_exit
since the console isn't bound anymore and we set fbcon_has_exited.
GPU 1 creates a new fb0 which is primary and we want to be console.
fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
however as fbcon_has_exited is set nothing further ever happens.
This patch bypasses the fbcon_has_exited and checks if the console is unbound,
if its unbound it calls the fbcon_takeover which calls the vt layer to
call the fbcon_startup method and everthing works.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/console/fbcon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 7ccc967..6662687 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (oldidx = newidx)
return 0;
- if (!info || fbcon_has_exited)
+ if (!info)
return -EINVAL;
- if (!err && !search_for_mapped_con()) {
+ if (!search_for_mapped_con() || !con_is_bound(&fb_con)) {
info_idx = newidx;
return fbcon_takeover(0);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread* [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
@ 2010-12-21 1:41 ` Dave Airlie
0 siblings, 0 replies; 30+ messages in thread
From: Dave Airlie @ 2010-12-21 1:41 UTC (permalink / raw)
To: linux-fbdev; +Cc: dri-devel, linux-kernel, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
Situation as follow:
2 GPUs + vesafb + kms.
GPU 1 is primary, vesafb binds to it as fb0
radeon loads
GPU 0 loads as fb1
GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
console, which causes the dummy console to rebind.
this means fbcon_deinit gets called, which calls fbcon_exit
since the console isn't bound anymore and we set fbcon_has_exited.
GPU 1 creates a new fb0 which is primary and we want to be console.
fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
however as fbcon_has_exited is set nothing further ever happens.
This patch bypasses the fbcon_has_exited and checks if the console is unbound,
if its unbound it calls the fbcon_takeover which calls the vt layer to
call the fbcon_startup method and everthing works.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/video/console/fbcon.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 7ccc967..6662687 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -823,10 +823,10 @@ static int set_con2fb_map(int unit, int newidx, int user)
if (oldidx == newidx)
return 0;
- if (!info || fbcon_has_exited)
+ if (!info)
return -EINVAL;
- if (!err && !search_for_mapped_con()) {
+ if (!search_for_mapped_con() || !con_is_bound(&fb_con)) {
info_idx = newidx;
return fbcon_takeover(0);
}
--
1.7.1
^ permalink raw reply related [flat|nested] 30+ messages in thread* Re: [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
(?)
@ 2010-12-24 3:30 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:30 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 11:41:17AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Situation as follow:
> 2 GPUs + vesafb + kms.
>
> GPU 1 is primary, vesafb binds to it as fb0
> radeon loads
> GPU 0 loads as fb1
> GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
> console, which causes the dummy console to rebind.
>
> this means fbcon_deinit gets called, which calls fbcon_exit
> since the console isn't bound anymore and we set fbcon_has_exited.
>
> GPU 1 creates a new fb0 which is primary and we want to be console.
> fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
> however as fbcon_has_exited is set nothing further ever happens.
>
> This patch bypasses the fbcon_has_exited and checks if the console is unbound,
> if its unbound it calls the fbcon_takeover which calls the vt layer to
> call the fbcon_startup method and everthing works.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
This one looks fine, too. This does presumably depend on the change in
behaviour introduced by your 2/3 patch though. I'll hold off on applying
this until that one gets acked, then we can do this either for the next
-rc or for .38.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
--
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
(?)
(?)
@ 2010-12-24 3:30 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:30 UTC (permalink / raw)
To: Dave Airlie; +Cc: Dave Airlie, linux-fbdev, linux-kernel, dri-devel
On Tue, Dec 21, 2010 at 11:41:17AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Situation as follow:
> 2 GPUs + vesafb + kms.
>
> GPU 1 is primary, vesafb binds to it as fb0
> radeon loads
> GPU 0 loads as fb1
> GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
> console, which causes the dummy console to rebind.
>
> this means fbcon_deinit gets called, which calls fbcon_exit
> since the console isn't bound anymore and we set fbcon_has_exited.
>
> GPU 1 creates a new fb0 which is primary and we want to be console.
> fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
> however as fbcon_has_exited is set nothing further ever happens.
>
> This patch bypasses the fbcon_has_exited and checks if the console is unbound,
> if its unbound it calls the fbcon_takeover which calls the vt layer to
> call the fbcon_startup method and everthing works.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
This one looks fine, too. This does presumably depend on the change in
behaviour introduced by your 2/3 patch though. I'll hold off on applying
this until that one gets acked, then we can do this either for the next
-rc or for .38.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
2010-12-21 1:41 ` Dave Airlie
@ 2010-12-24 3:30 ` Paul Mundt
-1 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:30 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-fbdev, dri-devel, linux-kernel, Dave Airlie
On Tue, Dec 21, 2010 at 11:41:17AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Situation as follow:
> 2 GPUs + vesafb + kms.
>
> GPU 1 is primary, vesafb binds to it as fb0
> radeon loads
> GPU 0 loads as fb1
> GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
> console, which causes the dummy console to rebind.
>
> this means fbcon_deinit gets called, which calls fbcon_exit
> since the console isn't bound anymore and we set fbcon_has_exited.
>
> GPU 1 creates a new fb0 which is primary and we want to be console.
> fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
> however as fbcon_has_exited is set nothing further ever happens.
>
> This patch bypasses the fbcon_has_exited and checks if the console is unbound,
> if its unbound it calls the fbcon_takeover which calls the vt layer to
> call the fbcon_startup method and everthing works.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
This one looks fine, too. This does presumably depend on the change in
behaviour introduced by your 2/3 patch though. I'll hold off on applying
this until that one gets acked, then we can do this either for the next
-rc or for .38.
^ permalink raw reply [flat|nested] 30+ messages in thread
* Re: [PATCH 3/3] fbcon: fix situation where fbcon gets deinitialised and can't reinit.
@ 2010-12-24 3:30 ` Paul Mundt
0 siblings, 0 replies; 30+ messages in thread
From: Paul Mundt @ 2010-12-24 3:30 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-fbdev, dri-devel, linux-kernel, Dave Airlie
On Tue, Dec 21, 2010 at 11:41:17AM +1000, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Situation as follow:
> 2 GPUs + vesafb + kms.
>
> GPU 1 is primary, vesafb binds to it as fb0
> radeon loads
> GPU 0 loads as fb1
> GPU 1 loads, vesafb gets kicked off which causes fb0 to unbind
> console, which causes the dummy console to rebind.
>
> this means fbcon_deinit gets called, which calls fbcon_exit
> since the console isn't bound anymore and we set fbcon_has_exited.
>
> GPU 1 creates a new fb0 which is primary and we want to be console.
> fbcon_fb_registered gets called sets the primary up and calls set_con2fb_map,
> however as fbcon_has_exited is set nothing further ever happens.
>
> This patch bypasses the fbcon_has_exited and checks if the console is unbound,
> if its unbound it calls the fbcon_takeover which calls the vt layer to
> call the fbcon_startup method and everthing works.
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
This one looks fine, too. This does presumably depend on the change in
behaviour introduced by your 2/3 patch though. I'll hold off on applying
this until that one gets acked, then we can do this either for the next
-rc or for .38.
^ permalink raw reply [flat|nested] 30+ messages in thread