All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon: restore nomodeset operation (v2)
@ 2013-05-15  1:23 Dave Airlie
  2013-05-15 13:00 ` Alex Deucher
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Airlie @ 2013-05-15  1:23 UTC (permalink / raw)
  To: dri-devel

From: Dave Airlie <airlied@redhat.com>

When UMS was deprecated it removed support for nomodeset commandline
we really want this in distro land so we can debug stuff, everyone
should fallback to vesa correctly.

v2: oops -1 isn't used anymore, restore original behaviour
-1 is default, so we can boot with nomodeset on the command line,
then use radeon.modeset=1 to override it for debugging later.

Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index d33f484..094e7e5 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
 #endif
 
 int radeon_no_wb;
-int radeon_modeset = 1;
+int radeon_modeset = -1;
 int radeon_dynclks = -1;
 int radeon_r4xx_atom = 0;
 int radeon_agpmode = 0;
@@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
 
 static int __init radeon_init(void)
 {
+#ifdef CONFIG_VGA_CONSOLE
+	if (vgacon_text_force() && radeon_modeset == -1) {
+		DRM_INFO("VGACON disable radeon kernel modesetting.\n");
+		radeon_modeset = 0;
+	}
+#endif
+	/* set to modesetting by default if not nomodeset */
+	if (radeon_modeset == -1)
+		radeon_modeset = 1;
+
 	if (radeon_modeset == 1) {
 		DRM_INFO("radeon kernel modesetting enabled.\n");
 		driver = &kms_driver;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/radeon: restore nomodeset operation (v2)
  2013-05-15  1:23 [PATCH] drm/radeon: restore nomodeset operation (v2) Dave Airlie
@ 2013-05-15 13:00 ` Alex Deucher
  2013-05-15 13:21   ` Christian König
  0 siblings, 1 reply; 3+ messages in thread
From: Alex Deucher @ 2013-05-15 13:00 UTC (permalink / raw)
  To: Dave Airlie; +Cc: dri-devel

On Tue, May 14, 2013 at 9:23 PM, Dave Airlie <airlied@gmail.com> wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> When UMS was deprecated it removed support for nomodeset commandline
> we really want this in distro land so we can debug stuff, everyone
> should fallback to vesa correctly.
>
> v2: oops -1 isn't used anymore, restore original behaviour
> -1 is default, so we can boot with nomodeset on the command line,
> then use radeon.modeset=1 to override it for debugging later.
>
> Cc: stable@vger.kernel.org
> Signed-off-by: Dave Airlie <airlied@redhat.com>

Whoops.  Looks good to me.  Do you want me take this patch through my
tree or do you want to apply it?

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>


> ---
>  drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
> index d33f484..094e7e5 100644
> --- a/drivers/gpu/drm/radeon/radeon_drv.c
> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
> @@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
>  #endif
>
>  int radeon_no_wb;
> -int radeon_modeset = 1;
> +int radeon_modeset = -1;
>  int radeon_dynclks = -1;
>  int radeon_r4xx_atom = 0;
>  int radeon_agpmode = 0;
> @@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
>
>  static int __init radeon_init(void)
>  {
> +#ifdef CONFIG_VGA_CONSOLE
> +       if (vgacon_text_force() && radeon_modeset == -1) {
> +               DRM_INFO("VGACON disable radeon kernel modesetting.\n");
> +               radeon_modeset = 0;
> +       }
> +#endif
> +       /* set to modesetting by default if not nomodeset */
> +       if (radeon_modeset == -1)
> +               radeon_modeset = 1;
> +
>         if (radeon_modeset == 1) {
>                 DRM_INFO("radeon kernel modesetting enabled.\n");
>                 driver = &kms_driver;
> --
> 1.8.1.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/radeon: restore nomodeset operation (v2)
  2013-05-15 13:00 ` Alex Deucher
@ 2013-05-15 13:21   ` Christian König
  0 siblings, 0 replies; 3+ messages in thread
From: Christian König @ 2013-05-15 13:21 UTC (permalink / raw)
  To: Alex Deucher; +Cc: dri-devel

Am 15.05.2013 15:00, schrieb Alex Deucher:
> On Tue, May 14, 2013 at 9:23 PM, Dave Airlie <airlied@gmail.com> wrote:
>> From: Dave Airlie <airlied@redhat.com>
>>
>> When UMS was deprecated it removed support for nomodeset commandline
>> we really want this in distro land so we can debug stuff, everyone
>> should fallback to vesa correctly.
>>
>> v2: oops -1 isn't used anymore, restore original behaviour
>> -1 is default, so we can boot with nomodeset on the command line,
>> then use radeon.modeset=1 to override it for debugging later.
>>
>> Cc: stable@vger.kernel.org
>> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Whoops.  Looks good to me.  Do you want me take this patch through my
> tree or do you want to apply it?
>
> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

I was really wondering what that code does exactly while removing it, 
now I know. Patch is:

Reviewed-by: Christian König <christian.koenig@amd.com>

>
>
>> ---
>>   drivers/gpu/drm/radeon/radeon_drv.c | 12 +++++++++++-
>>   1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
>> index d33f484..094e7e5 100644
>> --- a/drivers/gpu/drm/radeon/radeon_drv.c
>> +++ b/drivers/gpu/drm/radeon/radeon_drv.c
>> @@ -147,7 +147,7 @@ static inline void radeon_unregister_atpx_handler(void) {}
>>   #endif
>>
>>   int radeon_no_wb;
>> -int radeon_modeset = 1;
>> +int radeon_modeset = -1;
>>   int radeon_dynclks = -1;
>>   int radeon_r4xx_atom = 0;
>>   int radeon_agpmode = 0;
>> @@ -456,6 +456,16 @@ static struct pci_driver radeon_kms_pci_driver = {
>>
>>   static int __init radeon_init(void)
>>   {
>> +#ifdef CONFIG_VGA_CONSOLE
>> +       if (vgacon_text_force() && radeon_modeset == -1) {
>> +               DRM_INFO("VGACON disable radeon kernel modesetting.\n");
>> +               radeon_modeset = 0;
>> +       }
>> +#endif
>> +       /* set to modesetting by default if not nomodeset */
>> +       if (radeon_modeset == -1)
>> +               radeon_modeset = 1;
>> +
>>          if (radeon_modeset == 1) {
>>                  DRM_INFO("radeon kernel modesetting enabled.\n");
>>                  driver = &kms_driver;
>> --
>> 1.8.1.2
>>
>> _______________________________________________
>> dri-devel mailing list
>> dri-devel@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/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] 3+ messages in thread

end of thread, other threads:[~2013-05-15 13:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-15  1:23 [PATCH] drm/radeon: restore nomodeset operation (v2) Dave Airlie
2013-05-15 13:00 ` Alex Deucher
2013-05-15 13:21   ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.