linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
@ 2022-11-15 10:05 Zopolis0
  2022-11-15 17:05 ` Helge Deller
  0 siblings, 1 reply; 6+ messages in thread
From: Zopolis0 @ 2022-11-15 10:05 UTC (permalink / raw)
  To: linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 425 bytes --]

Just upstreaming the gc/wii framebuffer driver from gc-linux, and
incorporates Farter's patch to solve the color issue. See
https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/
and https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/.

The patch is attached as a compressed .bz2 file because my previous
message bounced for being too long.

[-- Attachment #2: 0001-Add-framebuffer-device-driver-for-gamecube-wii-incor.patch.bz2 --]
[-- Type: application/octet-stream, Size: 22584 bytes --]

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

* Re: [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
  2022-11-15 10:05 [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work Zopolis0
@ 2022-11-15 17:05 ` Helge Deller
  2022-11-15 22:38   ` Zopolis0
       [not found]   ` <CAEYL+X-GSKCP9j0fz6m_VQ0tBH+adEkChWMxpOkeQ8TXC8tguw@mail.gmail.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Helge Deller @ 2022-11-15 17:05 UTC (permalink / raw)
  To: Zopolis0, linux-fbdev

On 11/15/22 11:05, Zopolis0 wrote:
> Just upstreaming the gc/wii framebuffer driver from gc-linux, and
> incorporates Farter's patch to solve the color issue. See
> https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/
> and https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/.

Just for the record:
Is there a reason why it wasn't (or can't be) ported to DRM ?
Looking at the patch (and the hardware behind it) I do see various reasons,
but I'd like to hear it from you...

Helge

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

* Re: [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
  2022-11-15 17:05 ` Helge Deller
@ 2022-11-15 22:38   ` Zopolis0
  2022-11-16  8:46     ` Thomas Zimmermann
       [not found]   ` <CAEYL+X-GSKCP9j0fz6m_VQ0tBH+adEkChWMxpOkeQ8TXC8tguw@mail.gmail.com>
  1 sibling, 1 reply; 6+ messages in thread
From: Zopolis0 @ 2022-11-15 22:38 UTC (permalink / raw)
  To: Helge Deller; +Cc: linux-fbdev

I'm not too familiar with DRM, unfortunately, so I can't give you a
great answer.

My current aim is just to get this and the other gc-linux patches into
upstream before they begin to rot.

But, I'd be happy to look into porting this to DRM after it's merged though.

On Wed, Nov 16, 2022 at 4:05 AM Helge Deller <deller@gmx.de> wrote:
>
> On 11/15/22 11:05, Zopolis0 wrote:
> > Just upstreaming the gc/wii framebuffer driver from gc-linux, and
> > incorporates Farter's patch to solve the color issue. See
> > https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/
> > and https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/.
>
> Just for the record:
> Is there a reason why it wasn't (or can't be) ported to DRM ?
> Looking at the patch (and the hardware behind it) I do see various reasons,
> but I'd like to hear it from you...
>
> Helge

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

* Re: [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
  2022-11-15 22:38   ` Zopolis0
@ 2022-11-16  8:46     ` Thomas Zimmermann
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2022-11-16  8:46 UTC (permalink / raw)
  To: Zopolis0, Helge Deller; +Cc: linux-fbdev


[-- Attachment #1.1: Type: text/plain, Size: 1289 bytes --]

Hi

Am 15.11.22 um 23:38 schrieb Zopolis0:
> I'm not too familiar with DRM, unfortunately, so I can't give you a
> great answer.
> 
> My current aim is just to get this and the other gc-linux patches into
> upstream before they begin to rot.
> 
> But, I'd be happy to look into porting this to DRM after it's merged though.

We generally don't accept new drivers into fbdev.

Best regards
Thomas

> 
> On Wed, Nov 16, 2022 at 4:05 AM Helge Deller <deller@gmx.de> wrote:
>>
>> On 11/15/22 11:05, Zopolis0 wrote:
>>> Just upstreaming the gc/wii framebuffer driver from gc-linux, and
>>> incorporates Farter's patch to solve the color issue. See
>>> https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/
>>> and https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/.
>>
>> Just for the record:
>> Is there a reason why it wasn't (or can't be) ported to DRM ?
>> Looking at the patch (and the hardware behind it) I do see various reasons,
>> but I'd like to hear it from you...
>>
>> Helge

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

* Re: [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
       [not found]   ` <CAEYL+X-GSKCP9j0fz6m_VQ0tBH+adEkChWMxpOkeQ8TXC8tguw@mail.gmail.com>
@ 2022-11-18  8:57     ` Helge Deller
  2022-11-18 13:08       ` Thomas Zimmermann
  0 siblings, 1 reply; 6+ messages in thread
From: Helge Deller @ 2022-11-18  8:57 UTC (permalink / raw)
  To: Zopolis0; +Cc: linux-fbdev, Thomas Zimmermann

Hello Maximilian,

On 11/15/22 23:05, Zopolis0 wrote:
> I'm not too familiar with DRM, unfortunately, so I can't give you a great answer.
>
> My current aim is just to get this and the other gc-linux patches into upstream before they begin to rot.
>
> But, I'd be happy to look into porting this to DRM after it's merged though.

Your aim to upstream the patches is ok, but generally DRM is the way forward
for Linux graphics.

I've briefly looked at the driver and it seems that it initially sets up the
graphics mode, and that changes to the screen are then rendered into a memory
buffer from where a damage detection is then run which updates the screen.
As far as I understand DRM, this is how it's done in DRM for various
graphics drivers (Thomas, please correct me if I'm wrong!).
Additionally the driver includes two IOCTLs for FBIOWAITRETRACE (wait for retrace)
and FBIOFLIPHACK (wait until a specific video page is visible or not visible).
I assume libsdl is using those? Are they still required nowadays?
I don't know if such ioctls are doable in DRM or if DRM has other
possibilities - this would be interesting as it would help to decide
if porting to DRM is possible & useful.

Usually we also expect the patches to be sent with proper commit messages
in plain text to the mailing lists. Since you had problems with this, I've
stored your patch in the fbdev-wii branch of my git repo, so that it's easier
for me to take a look at the patch. For people who are interested as well,
it's archieved here now:
https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?h=fbdev-wii&id=802bb0aa1af149ec8299ea7dfebf3fc10dc9c3df

That said, I wish you much success with pushing the other gc-patches upstream.
But for now I won't merge this patch unless the possibility to convert to DRM
has been fully clarified.

Helge

> On Wed, 16 Nov 2022 at 04:05, Helge Deller <deller@gmx.de <mailto:deller@gmx.de>> wrote:
>
>     On 11/15/22 11:05, Zopolis0 wrote:
>      > Just upstreaming the gc/wii framebuffer driver from gc-linux, and
>      > incorporates Farter's patch to solve the color issue. See
>      > https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/ <https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/>
>      > and https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/ <https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/>.
>
>     Just for the record:
>     Is there a reason why it wasn't (or can't be) ported to DRM ?
>     Looking at the patch (and the hardware behind it) I do see various reasons,
>     but I'd like to hear it from you...
>
>     Helge
>


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

* Re: [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work.
  2022-11-18  8:57     ` Helge Deller
@ 2022-11-18 13:08       ` Thomas Zimmermann
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Zimmermann @ 2022-11-18 13:08 UTC (permalink / raw)
  To: Helge Deller, Zopolis0; +Cc: linux-fbdev


[-- Attachment #1.1: Type: text/plain, Size: 4178 bytes --]

Hi

Am 18.11.22 um 09:57 schrieb Helge Deller:
> Hello Maximilian,
> 
> On 11/15/22 23:05, Zopolis0 wrote:
>> I'm not too familiar with DRM, unfortunately, so I can't give you a 
>> great answer.
>>
>> My current aim is just to get this and the other gc-linux patches into 
>> upstream before they begin to rot.
>>
>> But, I'd be happy to look into porting this to DRM after it's merged 
>> though.
> 
> Your aim to upstream the patches is ok, but generally DRM is the way 
> forward
> for Linux graphics.
> 
> I've briefly looked at the driver and it seems that it initially sets up 
> the
> graphics mode, and that changes to the screen are then rendered into a 
> memory
> buffer from where a damage detection is then run which updates the screen.
> As far as I understand DRM, this is how it's done in DRM for various
> graphics drivers (Thomas, please correct me if I'm wrong!).

You're right. We do this for most simple hardware that has limited 
options for color formats and/or display memory.

> Additionally the driver includes two IOCTLs for FBIOWAITRETRACE (wait 
> for retrace)
> and FBIOFLIPHACK (wait until a specific video page is visible or not 
> visible).
> I assume libsdl is using those? Are they still required nowadays?
> I don't know if such ioctls are doable in DRM or if DRM has other
> possibilities - this would be interesting as it would help to decide
> if porting to DRM is possible & useful.

There's the DRM_IOCTL_WAIT_VBLANK ioctl, which appears to do the same as 
FBIOWAITRETRACE. IDK the meaning of FBIOFLIPHACK, but if it's just for 
vsync-ing display updates then DRM does this automatically as part of 
the pageflip.

> 
> Usually we also expect the patches to be sent with proper commit messages
> in plain text to the mailing lists. Since you had problems with this, I've
> stored your patch in the fbdev-wii branch of my git repo, so that it's 
> easier
> for me to take a look at the patch. For people who are interested as well,
> it's archieved here now:
> https://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev.git/commit/?h=fbdev-wii&id=802bb0aa1af149ec8299ea7dfebf3fc10dc9c3df
> 
> That said, I wish you much success with pushing the other gc-patches 
> upstream.
> But for now I won't merge this patch unless the possibility to convert 
> to DRM
> has been fully clarified.

The best we can do might be drivers/staging. But staging would only make 
it easier to track DRM during the port.

With DRM, you'd initially have to put some effort into the port. And DRM 
is different enough from fbdev that it really is work.  But once ported, 
DRM offers a well-maintained set of helpers and features. And most of 
all, you'd get support for modern userspace.  Fbdev support in userspace 
is dying and only the text console is reliably available.^1

Best regards
Thomas

^1: There are ideas of moving away from fbdev-based consoles.

> 
> Helge
> 
>> On Wed, 16 Nov 2022 at 04:05, Helge Deller <deller@gmx.de 
>> <mailto:deller@gmx.de>> wrote:
>>
>>     On 11/15/22 11:05, Zopolis0 wrote:
>>      > Just upstreaming the gc/wii framebuffer driver from gc-linux, and
>>      > incorporates Farter's patch to solve the color issue. See
>>      > 
>> https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/ <https://fartersoft.com/blog/2011/06/22/hacking-up-an-rgb-framebuffer-driver-for-wii-linux/>
>>      > and 
>> https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/ <https://fartersoft.com/blog/2011/07/31/hacking-up-an-rgb-framebuffer-driver-for-wii-linux-take-two/>.
>>
>>     Just for the record:
>>     Is there a reason why it wasn't (or can't be) ported to DRM ?
>>     Looking at the patch (and the hardware behind it) I do see various 
>> reasons,
>>     but I'd like to hear it from you...
>>
>>     Helge
>>
> 

-- 
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

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

end of thread, other threads:[~2022-11-18 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 10:05 [PATCH] Add framebuffer device driver for gamecube/wii, incorporating Farter's work Zopolis0
2022-11-15 17:05 ` Helge Deller
2022-11-15 22:38   ` Zopolis0
2022-11-16  8:46     ` Thomas Zimmermann
     [not found]   ` <CAEYL+X-GSKCP9j0fz6m_VQ0tBH+adEkChWMxpOkeQ8TXC8tguw@mail.gmail.com>
2022-11-18  8:57     ` Helge Deller
2022-11-18 13:08       ` Thomas Zimmermann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).