diff mbox series

[04/11] drivers/ps3: Read video= option with fb_get_option()

Message ID 20230209135509.7786-5-tzimmermann@suse.de (mailing list archive)
State Handled Elsewhere
Headers show
Series drm,fbdev: Move video= option to drivers/video | expand

Commit Message

Thomas Zimmermann Feb. 9, 2023, 1:55 p.m. UTC
Get the kernel's global video= parameter with fb_get_option(). Done
to unexport the internal fbdev state fb_mode_config. No functional
changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 drivers/ps3/ps3av.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

Comments

Geoff Levand Feb. 12, 2023, 4:53 p.m. UTC | #1
Hi Thomas,

On 2/9/23 05:55, Thomas Zimmermann wrote:
> Get the kernel's global video= parameter with fb_get_option(). Done
> to unexport the internal fbdev state fb_mode_config. No functional
> changes.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---
>  drivers/ps3/ps3av.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)

I wanted to test these changes on the PS3, but got this
error when trying to apply this patch set to Linux-6.2-rc7:

  Applying: fbdev: Handle video= parameter in video/cmdline.c
  error: patch failed: drivers/gpu/drm/Kconfig:10
  error: drivers/gpu/drm/Kconfig: patch does not apply

Is there a Linux kernel revision that these will apply to,
or is there a git repository I can pull them from?

-Geoff
Thomas Zimmermann Feb. 13, 2023, 11:29 a.m. UTC | #2
Hi

Am 12.02.23 um 17:53 schrieb Geoff Levand:
> Hi Thomas,
> 
> On 2/9/23 05:55, Thomas Zimmermann wrote:
>> Get the kernel's global video= parameter with fb_get_option(). Done
>> to unexport the internal fbdev state fb_mode_config. No functional
>> changes.
>>
>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>> ---
>>   drivers/ps3/ps3av.c | 11 +++++++++--
>>   1 file changed, 9 insertions(+), 2 deletions(-)
> 
> I wanted to test these changes on the PS3, but got this
> error when trying to apply this patch set to Linux-6.2-rc7:
> 
>    Applying: fbdev: Handle video= parameter in video/cmdline.c
>    error: patch failed: drivers/gpu/drm/Kconfig:10
>    error: drivers/gpu/drm/Kconfig: patch does not apply
> 
> Is there a Linux kernel revision that these will apply to,
> or is there a git repository I can pull them from?

Thanks for testing.  My base version is a recent DRM development tree. 
The repo is at https://cgit.freedesktop.org/drm/drm-tip/, the branch is 
drm-tip.

If acceptable, I'd later like to merge the PS3 patches through DRM trees.

Best regards
Thomas

> 
> -Geoff
Geoff Levand Feb. 13, 2023, 4:31 p.m. UTC | #3
Hi,

On 2/13/23 03:29, Thomas Zimmermann wrote:
> Am 12.02.23 um 17:53 schrieb Geoff Levand:
>> On 2/9/23 05:55, Thomas Zimmermann wrote:
>>> Get the kernel's global video= parameter with fb_get_option(). Done
>>> to unexport the internal fbdev state fb_mode_config. No functional
>>> changes.
>>>
>>> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
>>> ---
>>>   drivers/ps3/ps3av.c | 11 +++++++++--
>>>   1 file changed, 9 insertions(+), 2 deletions(-)
>>
>> I wanted to test these changes on the PS3, but got this
>> error when trying to apply this patch set to Linux-6.2-rc7:
>>
>>    Applying: fbdev: Handle video= parameter in video/cmdline.c
>>    error: patch failed: drivers/gpu/drm/Kconfig:10
>>    error: drivers/gpu/drm/Kconfig: patch does not apply
>>
>> Is there a Linux kernel revision that these will apply to,
>> or is there a git repository I can pull them from?
> 
> Thanks for testing.  My base version is a recent DRM development tree. The repo is at https://cgit.freedesktop.org/drm/drm-tip/, the branch is drm-tip.

I tested the drm-tip branch at c54b5fcf3e68 on PS3 and it
seemed to work OK.

Tested-by: Geoff Levand <geoff@infradead.org>
Javier Martinez Canillas Feb. 17, 2023, 8:46 a.m. UTC | #4
Thomas Zimmermann <tzimmermann@suse.de> writes:

> Get the kernel's global video= parameter with fb_get_option(). Done
> to unexport the internal fbdev state fb_mode_config. No functional
> changes.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

Best regards,
Javier
diff mbox series

Patch

diff --git a/drivers/ps3/ps3av.c b/drivers/ps3/ps3av.c
index 516e6d14d32e..8f3e60f1bfe2 100644
--- a/drivers/ps3/ps3av.c
+++ b/drivers/ps3/ps3av.c
@@ -921,6 +921,9 @@  EXPORT_SYMBOL_GPL(ps3av_audio_mute);
 
 static int ps3av_probe(struct ps3_system_bus_device *dev)
 {
+#ifdef CONFIG_FB
+	char *mode_option = NULL;
+#endif
 	int res;
 	int id;
 
@@ -969,8 +972,12 @@  static int ps3av_probe(struct ps3_system_bus_device *dev)
 	ps3av_get_hw_conf(ps3av);
 
 #ifdef CONFIG_FB
-	if (fb_mode_option && !strcmp(fb_mode_option, "safe"))
-		safe_mode = 1;
+	fb_get_options(NULL, &mode_option);
+	if (mode_option) {
+		if (!strcmp(mode_option, "safe"))
+			safe_mode = 1;
+		kfree(mode_option);
+	}
 #endif /* CONFIG_FB */
 	id = ps3av_auto_videomode(&ps3av->av_hw_conf);
 	if (id < 0) {