Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-25 Thread Lubomir Rintel
On Wed, Jan 20, 2021 at 06:00:30PM +0100, Noralf Trønnes wrote:
> Hi,
> 
> A while back I had the idea to turn a Raspberry Pi Zero into a $5
> USB to HDMI/SDTV/DSI/DPI display adapter.
> 
> The reason for calling it 'Generic' is so anyone can make a USB
> display/adapter against this driver, all that's needed is to add a USB
> vid:pid.
> 
> Unfortunately I've had some compounding health problems that have
> severally limited the time I can spend in front of a computer. For this
> reason I've decided to keep the gadget driver out-of-tree and focus on
> getting the host driver merged first.
> 
> See the wiki[1] for more information and images for the Raspberry Pi
> Zero/4.
> 
> One big change this time is that I've followed Peter Stuge's advice to
> not let DRM stuff leak into the USB protocol. This has made the protocol
> easier to understand just from reading the header file.
> 
> Noralf.
> 
> [1] https://github.com/notro/gud/wiki

The patch set:

Tested-by: Lubomir Rintel 

Works like a charm with this board [1], though it didn't impress the girls
as much as I hoped. Code here [2], picture here [3].

[1] 
https://www.banggood.com/LILYGO-TTGO-T-Display-GD32-RISC-V-32-bit-Core-Minimal-Development-Board-1_14-IPS-p-1652870.html?rmmds=search_warehouse=CN
[2] https://github.com/hackerspace/libopencm3-gf32v-examples/commit/7ef51b31b9
[3] https://people.freedesktop.org/~lkundrak/lilygo.jpeg

Had to apply a fix for the drm_connector_enum_list[] ommission I mentioned
elsewhere, and that I've now noticed you've noted previously.

Take care
Lubo

> 
> 
> Noralf Trønnes (3):
>   drm/uapi: Add USB connector type
>   drm/probe-helper: Check epoch counter in output_poll_execute()
>   drm: Add Generic USB Display driver
> 
>  MAINTAINERS |   8 +
>  drivers/gpu/drm/Kconfig |   2 +
>  drivers/gpu/drm/Makefile|   1 +
>  drivers/gpu/drm/drm_probe_helper.c  |   7 +-
>  drivers/gpu/drm/gud/Kconfig |  14 +
>  drivers/gpu/drm/gud/Makefile|   4 +
>  drivers/gpu/drm/gud/gud_connector.c | 722 
>  drivers/gpu/drm/gud/gud_drv.c   | 620 
>  drivers/gpu/drm/gud/gud_internal.h  | 148 ++
>  drivers/gpu/drm/gud/gud_pipe.c  | 472 ++
>  include/drm/gud.h   | 356 ++
>  include/uapi/drm/drm_mode.h |   1 +
>  12 files changed, 2354 insertions(+), 1 deletion(-)
>  create mode 100644 drivers/gpu/drm/gud/Kconfig
>  create mode 100644 drivers/gpu/drm/gud/Makefile
>  create mode 100644 drivers/gpu/drm/gud/gud_connector.c
>  create mode 100644 drivers/gpu/drm/gud/gud_drv.c
>  create mode 100644 drivers/gpu/drm/gud/gud_internal.h
>  create mode 100644 drivers/gpu/drm/gud/gud_pipe.c
>  create mode 100644 include/drm/gud.h
> 
> -- 
> 2.23.0
> 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-24 Thread Noralf Trønnes


Den 24.01.2021 19.38, skrev Lubomir Rintel:
> On Wed, Jan 20, 2021 at 06:00:30PM +0100, Noralf Trønnes wrote:
>> Hi,
>>
>> A while back I had the idea to turn a Raspberry Pi Zero into a $5
>> USB to HDMI/SDTV/DSI/DPI display adapter.
>>
>> The reason for calling it 'Generic' is so anyone can make a USB
>> display/adapter against this driver, all that's needed is to add a USB
>> vid:pid.
>>
>> Unfortunately I've had some compounding health problems that have
>> severally limited the time I can spend in front of a computer. For this
>> reason I've decided to keep the gadget driver out-of-tree and focus on
>> getting the host driver merged first.
>>
>> See the wiki[1] for more information and images for the Raspberry Pi
>> Zero/4.
>>
>> One big change this time is that I've followed Peter Stuge's advice to
>> not let DRM stuff leak into the USB protocol. This has made the protocol
>> easier to understand just from reading the header file.
>>
>> Noralf.
>>
>> [1] https://github.com/notro/gud/wiki
> 
> The patch set:
> 
> Tested-by: Lubomir Rintel 
> 
> Works like a charm with this board [1], though it didn't impress the girls
> as much as I hoped. Code here [2], picture here [3].
> 

I have wondered what color display resolution it is possible to drive
over USB full speed. I can understand that your PoC wasn't that
impressive since it doesn't use DMA to drive the SPI bus.

The new $4 Raspberry Pi Pico that came out this week looks interesting
as a USB interface board for tiny panels. It can drive DPI panels
directly, has 2 cores @133MHz, 264K SRAM and USB full speed. Maybe lz4
decompression is even possible. Another good thing is that the board
will be around for a long time.

Thanks for testing, I have limited bandwith these days so I couldn't do
a test on an MCU myself.

Noralf.

> [1] 
> https://www.banggood.com/LILYGO-TTGO-T-Display-GD32-RISC-V-32-bit-Core-Minimal-Development-Board-1_14-IPS-p-1652870.html?rmmds=search_warehouse=CN
> [2] https://github.com/hackerspace/libopencm3-gf32v-examples/commit/7ef51b31b9
> [3] https://people.freedesktop.org/~lkundrak/lilygo.jpeg
> 
> Had to apply a fix for the drm_connector_enum_list[] ommission I mentioned
> elsewhere, and that I've now noticed you've noted previously.
> 
> Take care
> Lubo
> 
>>
>>
>> Noralf Trønnes (3):
>>   drm/uapi: Add USB connector type
>>   drm/probe-helper: Check epoch counter in output_poll_execute()
>>   drm: Add Generic USB Display driver
>>
>>  MAINTAINERS |   8 +
>>  drivers/gpu/drm/Kconfig |   2 +
>>  drivers/gpu/drm/Makefile|   1 +
>>  drivers/gpu/drm/drm_probe_helper.c  |   7 +-
>>  drivers/gpu/drm/gud/Kconfig |  14 +
>>  drivers/gpu/drm/gud/Makefile|   4 +
>>  drivers/gpu/drm/gud/gud_connector.c | 722 
>>  drivers/gpu/drm/gud/gud_drv.c   | 620 
>>  drivers/gpu/drm/gud/gud_internal.h  | 148 ++
>>  drivers/gpu/drm/gud/gud_pipe.c  | 472 ++
>>  include/drm/gud.h   | 356 ++
>>  include/uapi/drm/drm_mode.h |   1 +
>>  12 files changed, 2354 insertions(+), 1 deletion(-)
>>  create mode 100644 drivers/gpu/drm/gud/Kconfig
>>  create mode 100644 drivers/gpu/drm/gud/Makefile
>>  create mode 100644 drivers/gpu/drm/gud/gud_connector.c
>>  create mode 100644 drivers/gpu/drm/gud/gud_drv.c
>>  create mode 100644 drivers/gpu/drm/gud/gud_internal.h
>>  create mode 100644 drivers/gpu/drm/gud/gud_pipe.c
>>  create mode 100644 include/drm/gud.h
>>
>> -- 
>> 2.23.0
>>
> 
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-24 Thread Lubomir Rintel
On Wed, Jan 20, 2021 at 06:00:30PM +0100, Noralf Trønnes wrote:
> Hi,
> 
> A while back I had the idea to turn a Raspberry Pi Zero into a $5
> USB to HDMI/SDTV/DSI/DPI display adapter.
> 
> The reason for calling it 'Generic' is so anyone can make a USB
> display/adapter against this driver, all that's needed is to add a USB
> vid:pid.
> 
> Unfortunately I've had some compounding health problems that have
> severally limited the time I can spend in front of a computer. For this
> reason I've decided to keep the gadget driver out-of-tree and focus on
> getting the host driver merged first.
> 
> See the wiki[1] for more information and images for the Raspberry Pi
> Zero/4.
> 
> One big change this time is that I've followed Peter Stuge's advice to
> not let DRM stuff leak into the USB protocol. This has made the protocol
> easier to understand just from reading the header file.

Welcome back! I'm happy to see this patch set back on track. I've now
started putting together something that would work with GUD on
Lilygo T-Display-GD32, but it blew up in my face immediately (I had
CONFIG_DEBUG_SPINLOCK turned on):

  [   42.064362] usb 1-1.2: new full-speed USB device number 6 using mv-ehci
  [   42.228048] usb 1-1.2: New USB device found, idVendor=1d50, 
idProduct=614d, bcdDevice= 1.00
  [   42.236812] usb 1-1.2: New USB device strings: Mfr=1, Product=2, 
SerialNumber=3
  [   42.254298] usb 1-1.2: Product: LCD Display Interface
  [   42.259771] usb 1-1.2: Manufacturer: Lubomir Rintel 
  [   42.266395] usb 1-1.2: SerialNumber: 3736030061294139
  [   42.284771] BUG: spinlock bad magic on CPU#0, kworker/0:0/5
  [   42.290394] 8<--- cut here ---
  [   42.293415] Unable to handle kernel NULL pointer dereference at virtual 
address 031c
  [   42.301417] pgd = e351f484
  [   42.304184] [031c] *pgd=
  [   42.307826] Internal error: Oops: 15 [#1] PREEMPT SMP ARM
  [   42.313250] Modules linked in:
  [   42.316208] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 
5.11.0-rc4-00113-g8c3d05f1939a #1274
  [   42.324729] Hardware name: Marvell MMP3
  [   42.328540] Workqueue: usb_hub_wq hub_event
  [   42.332759] PC is at spin_dump+0x5c/0x88
  [   42.336556] LR is at spin_dump+0x48/0x88
  [   42.340644] pc : []lr : []psr: 200f0193
  [   42.346895] sp : c810b910  ip :   fp : c1107b40
  [   42.352039] r10: c005  r9 :   r8 : 001f
  [   42.357238] r7 :   r6 : 0438  r5 : c14456f8  r4 : 0014
  [   42.363837] r3 : 044c  r2 : c1091500  r1 : eefb8540  r0 : 002f
  [   42.370351] Flags: nzCv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment 
none
  [   42.377456] Control: 10c5387d  Table: 09f0806a  DAC: 0051
  [   42.383286] Process kworker/0:0 (pid: 5, stack limit = 0xda2575c6)
  [   42.389392] Stack: (0xc810b910 to 0xc810c000)
  [   42.393801] b900: 0005 c14456f8 
c14456f8 c058f244
  [   42.401916] b920: a00f0113 c018b1cc c14456f8 c058f244 a00f0113 c0c4e454 
0001 
  [   42.410117] b940: c058f244 0003 c9d1d800 ca01f000 7fff c058f244 
200f0113 0001
  [   42.418267] b960: 0cc0 c810a000 0dc0  c1053148 0023 
c9d1d814 c14456f8
  [   42.426399] b980:   0003   fcee162a 
0cc0 c9d1d800
  [   42.434607] b9a0: ca01f000  c810a000 0014 c9d1d814 c14452e0 
ca01f42c c0669f84
  [   42.442749] b9c0: c0668d98  0dc0 0dc0  c126dd90 
0dc0 ca01f24c
  [   42.450887] b9e0: 0410 c14456f8 ca01f000 fcee162a  c9d1d800 
 
  [   42.459087] ba00:  0001 ca01f000 ca01fac8 0002 c06965e0 
 
  [   42.467220] ba20:  c03027b0 c8001600 0001 c810a000 fcee162a 
 fcee162a
  [   42.475373] ba40: a00f0113 c9d25880 c0694894 a00f0113 c800 7820 
 fcee162a
  [   42.483470] ba60: 0002  ca01f000 c9ae7800 c810a000 0001 
c9d258c0 ca01fac8
  [   42.491685] ba80: 0002 c0694a14 0002 c0d68608  0001 
 c0186460
  [   42.499882] baa0: c9d65878 c9d25940 c0d51198 0001  36314752 
34325241 
  [   42.508038] bac0: 0001 c9ae7820  34325258 c9ae7800 c810a000 
0022 c0c4e6b8
  [   42.516202] bae0: c98b1a00 fcee162a c9d65878 c9ae7820 c9d65878 c1446198 
c9ae7800 c9d65800
  [   42.524347] bb00: 0001 c0d68618 ffed c07eae44 c07ead58 c9ae7820 
c18004e0 
  [   42.532534] bb20: c18004e8  c1446198 c14ab308 0022 c069f124 
c9ae79cc 0001
  [   42.540557] bb40: c9ae78dc  c14555b0 c9ae7820 c14ab308 c1446198 
c069fba4 0001
  [   42.548847] bb60: c1800494  c14555b0 c069f5bc 0001 c069fb78 
 c810bbc4
  [   42.556874] bb80: c810a000 0001 c1800494  c14555b0 c069cefc 
c14555b0 c8a964e4
  [   42.565179] bba0: c8e90d58 fcee162a c9d65934 c9ae7820 c810a000 c9ae7820 
c9ae7864 c069f8f4
  [   42.573316] bbc0: c109aed0 c9ae7820 0001 fcee162a 

Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-23 Thread Noralf Trønnes



Den 21.01.2021 11.20, skrev Simon Ser:
> On Thursday, January 21st, 2021 at 10:59 AM, Thomas Zimmermann 
>  wrote:
> 
>> Well, I'd strongly ask to not call it "generic", because it isn't. We
>> have other USB drivers and anyone can make a USB display with these
>> protocols as well. That doesn't make them generic. A USB-standardized
>> protocol would be generic. Maybe call it custom, or home-made.

I agree that Generic probably isn't the best term to use here. Naming
stuff is hard. Maybe: Open USB Display Protocol - oudp?

> 
> Maybe rename it to "GUD USB Display driver"? :P
> 

Oh that's a recursive acronym :-) That would save me all the work of
renaming. I think I'll go with that, thanks.

Noralf.
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-21 Thread Simon Ser
On Thursday, January 21st, 2021 at 10:59 AM, Thomas Zimmermann 
 wrote:

> Well, I'd strongly ask to not call it "generic", because it isn't. We
> have other USB drivers and anyone can make a USB display with these
> protocols as well. That doesn't make them generic. A USB-standardized
> protocol would be generic. Maybe call it custom, or home-made.

Maybe rename it to "GUD USB Display driver"? :P
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH v4 0/3] Generic USB Display driver

2021-01-21 Thread Thomas Zimmermann

Hi

Am 20.01.21 um 18:00 schrieb Noralf Trønnes:

Hi,

A while back I had the idea to turn a Raspberry Pi Zero into a $5
USB to HDMI/SDTV/DSI/DPI display adapter.

The reason for calling it 'Generic' is so anyone can make a USB
display/adapter against this driver, all that's needed is to add a USB
vid:pid.


Well, I'd strongly ask to not call it "generic", because it isn't. We 
have other USB drivers and anyone can make a USB display with these 
protocols as well. That doesn't make them generic. A USB-standardized 
protocol would be generic. Maybe call it custom, or home-made.


Best regards
Thomas



Unfortunately I've had some compounding health problems that have
severally limited the time I can spend in front of a computer. For this
reason I've decided to keep the gadget driver out-of-tree and focus on
getting the host driver merged first.

See the wiki[1] for more information and images for the Raspberry Pi
Zero/4.

One big change this time is that I've followed Peter Stuge's advice to
not let DRM stuff leak into the USB protocol. This has made the protocol
easier to understand just from reading the header file.

Noralf.

[1] https://github.com/notro/gud/wiki


Noralf Trønnes (3):
   drm/uapi: Add USB connector type
   drm/probe-helper: Check epoch counter in output_poll_execute()
   drm: Add Generic USB Display driver

  MAINTAINERS |   8 +
  drivers/gpu/drm/Kconfig |   2 +
  drivers/gpu/drm/Makefile|   1 +
  drivers/gpu/drm/drm_probe_helper.c  |   7 +-
  drivers/gpu/drm/gud/Kconfig |  14 +
  drivers/gpu/drm/gud/Makefile|   4 +
  drivers/gpu/drm/gud/gud_connector.c | 722 
  drivers/gpu/drm/gud/gud_drv.c   | 620 
  drivers/gpu/drm/gud/gud_internal.h  | 148 ++
  drivers/gpu/drm/gud/gud_pipe.c  | 472 ++
  include/drm/gud.h   | 356 ++
  include/uapi/drm/drm_mode.h |   1 +
  12 files changed, 2354 insertions(+), 1 deletion(-)
  create mode 100644 drivers/gpu/drm/gud/Kconfig
  create mode 100644 drivers/gpu/drm/gud/Makefile
  create mode 100644 drivers/gpu/drm/gud/gud_connector.c
  create mode 100644 drivers/gpu/drm/gud/gud_drv.c
  create mode 100644 drivers/gpu/drm/gud/gud_internal.h
  create mode 100644 drivers/gpu/drm/gud/gud_pipe.c
  create mode 100644 include/drm/gud.h



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



OpenPGP_signature
Description: OpenPGP digital signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


[PATCH v4 0/3] Generic USB Display driver

2021-01-20 Thread Noralf Trønnes
Hi,

A while back I had the idea to turn a Raspberry Pi Zero into a $5
USB to HDMI/SDTV/DSI/DPI display adapter.

The reason for calling it 'Generic' is so anyone can make a USB
display/adapter against this driver, all that's needed is to add a USB
vid:pid.

Unfortunately I've had some compounding health problems that have
severally limited the time I can spend in front of a computer. For this
reason I've decided to keep the gadget driver out-of-tree and focus on
getting the host driver merged first.

See the wiki[1] for more information and images for the Raspberry Pi
Zero/4.

One big change this time is that I've followed Peter Stuge's advice to
not let DRM stuff leak into the USB protocol. This has made the protocol
easier to understand just from reading the header file.

Noralf.

[1] https://github.com/notro/gud/wiki


Noralf Trønnes (3):
  drm/uapi: Add USB connector type
  drm/probe-helper: Check epoch counter in output_poll_execute()
  drm: Add Generic USB Display driver

 MAINTAINERS |   8 +
 drivers/gpu/drm/Kconfig |   2 +
 drivers/gpu/drm/Makefile|   1 +
 drivers/gpu/drm/drm_probe_helper.c  |   7 +-
 drivers/gpu/drm/gud/Kconfig |  14 +
 drivers/gpu/drm/gud/Makefile|   4 +
 drivers/gpu/drm/gud/gud_connector.c | 722 
 drivers/gpu/drm/gud/gud_drv.c   | 620 
 drivers/gpu/drm/gud/gud_internal.h  | 148 ++
 drivers/gpu/drm/gud/gud_pipe.c  | 472 ++
 include/drm/gud.h   | 356 ++
 include/uapi/drm/drm_mode.h |   1 +
 12 files changed, 2354 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/gud/Kconfig
 create mode 100644 drivers/gpu/drm/gud/Makefile
 create mode 100644 drivers/gpu/drm/gud/gud_connector.c
 create mode 100644 drivers/gpu/drm/gud/gud_drv.c
 create mode 100644 drivers/gpu/drm/gud/gud_internal.h
 create mode 100644 drivers/gpu/drm/gud/gud_pipe.c
 create mode 100644 include/drm/gud.h

-- 
2.23.0

___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel