MIPI DSI, DBI, and tinydrm drivers
Subsystems (3)
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular drm_panel instances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.
DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard drm_panel driver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.
I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular drm_panel drivers.
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 35 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
Quoted 4 lines
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used drm_panel, but I was not allowed to use it (at least not the way I had done it).
Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 32 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 16 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
Quoted 7 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).
Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested drm_panel even back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)
Cheers, Daniel
Quoted 12 lines
Noralf.
Quoted 5 lines
Cheers,
-Paul_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Daniel,
Quoted 46 lines · Daniel Vetter
Quoted 35 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 3 lines
Hi list,
I'd like to open a discussion about the current support of MIPI
DSI and
Quoted 4 lines
DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they
generally both
Quoted 1 line
use the same commands (DCS), the main difference is that DSI is
serial
Quoted 4 lines
and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there.
DSI
Quoted 1 line
panels are implemented as regular
drm_panelinstances, and theirdrivers
Quoted 1 line
go through the DSI API to communicate with the panel, which makes
them
Quoted 3 lines
independent of the DSI host driver.
DBI, on the other hand, does not have any of this. All (?) DBI
panels
Quoted 1 line
are implemented as tinydrm drivers, which make them impossible to
use
Quoted 2 lines
with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All thesetinydrm
Quoted 2 lines
drivers register their own DBI host as they all do DBI over SPI.
Quoted 9 lines
Quoted 3 lines
I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot
of code
Quoted 1 line
being duplicated. With the proper host/device registration
mechanism
Quoted 1 line
from DSI code, it would be possible to turn most of the tinydrm
drivers
Quoted 1 line
into regular
drm_paneldrivers.
Quoted 5 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
I'm trying to interface a ILI9331 based panel that has a DBI/8080 interface. The ILI9331 is very similar to the ILI9341 which already has a tinydrm driver. My SoC has a dedicated DBI/DSI controller, and I have currently no way to make it work with the ingenic-drm driver.
The idea of a generic drm_panel tinydrm driver was to avoid duplicating code between regular panel and tinydrm drivers, but the focus of my email was more to point that right now there is no way to interface a DBI panel with a regular DRM driver. Unlike DSI, there are currently no drivers with DBI support as there is no API to register a host DBI driver or a DBI panel driver. This is what's really missing here.
Cheers,
-Paul
Quoted 55 lines
Quoted 28 lines
Quoted 1 line
The problem then is that these should still be available as
tinydrm
Quoted 2 lines
drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic
tinydrm
Quoted 1 line
driver, which would then probably open a lot of doors, and help a
lot to
Quoted 3 lines
clean the mess.
I think I can help with that, I just need some guidance - I am
fishing
Quoted 3 lines
in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
The problem with DBI is that it has reused other busses which means
we
don't have DBI drivers, we have SPI drivers instead (6800/8080 is
not
avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.Quoted 3 lines
My initial tinydrm work used
drm_panel, but I was not allowed to
use it
(at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)Cheers, Daniel
Quoted 4 lines
Noralf.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Cheers,
-Paul_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
Quoted 43 lines · Paul Cercueil
Hi Daniel,
Quoted 34 lines · Daniel Vetter
Quoted 24 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
> Hi list,
>
> I'd like to open a discussion about the current support of MIPI DSI and > DBI panels.
>
> Both are standards from the MIPI alliance, both are communication > protocols between a LCD controller and a LCD panel, they generally both > use the same commands (DCS), the main difference is that DSI is serial > and DBI is generally parallel.
>
> In the kernel right now, DSI is pretty well implemented. All the > infrastucture to register a DSI host, DSI device etc. is there. DSI > panels are implemented as regulardrm_panelinstances, and their drivers > go through the DSI API to communicate with the panel, which makes them > independent of the DSI host driver.
>
> DBI, on the other hand, does not have any of this. All (?) DBI panels > are implemented as tinydrm drivers, which make them impossible to use > with regular DRM drivers. Writing a standarddrm_paneldriver is > impossible, as there is no concept of host and device. All these tinydrmQuoted 8 lines
> drivers register their own DBI host as they all do DBI over SPI. >
> I think this needs a good cleanup. Given that DSI and DBI are so > similar, it would probably make sense to fuse DBI support into the > current DSI code, as trying to update DBI would result in a lot of code > being duplicated. With the proper host/device registration mechanism > from DSI code, it would be possible to turn most of the tinydrm drivers > into regulardrm_paneldrivers.Quoted 5 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 4 lines
I'm trying to interface a ILI9331 based panel that has a DBI/8080 interface. The ILI9331 is very similar to the ILI9341 which already has a tinydrm driver. My SoC has a dedicated DBI/DSI controller, and I have currently no way to make it work with the ingenic-drm driver.
The idea of a generic
drm_paneltinydrm driver was to avoid duplicating code between regular panel and tinydrm drivers, but the focus of my email was more to point that right now there is no way to interface a DBI panel with a regular DRM driver. Unlike DSI, there are currently no drivers with DBI support as there is no API to register a host DBI driver or a DBI panel driver. This is what's really missing here.
Did you have a look at "Enable ili9341 and l3gd20 on stm32f429-disco" (http://lkml.kernel.org/r/[email protected]) from [email protected], it uses the STM32 DPI engine to feed a ili9341. Seems it would match your issue.
Neil
Quoted 57 lines
Cheers,
-PaulQuoted 36 lines
Quoted 17 lines
> The problem then is that these should still be available as tinydrm > drivers. If the DSI/DBI panels can somehow register a .update_fb() > callback, it would make it possible to have a panel-agnostic tinydrm > driver, which would then probably open a lot of doors, and help a lot to > clean the mess.
>
> I think I can help with that, I just need some guidance - I am fishing > in exotic seas here.
>
> Thoughts, comments, are very welcome.I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlQuoted 7 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)Cheers, Daniel
Quoted 3 lines
Noralf.
Quoted 16 lines
Quoted 9 lines
>
> Cheers,
> -Paul
>
>
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-develSignature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Neil,
Quoted 69 lines · Neil Armstrong
Hi,
Quoted 66 lines · Paul Cercueil
Hi Daniel,
Le dim. 24 mai 2020 à 20:35, Daniel Vetter <[email protected]> a
écrit :Quoted 53 lines
Quoted 41 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 3 lines
Hi list,
I'd like to open a discussion about the current support of
MIPI DSI and
Quoted 3 lines
DBI panels.
Both are standards from the MIPI alliance, both are
communication
Quoted 1 line
protocols between a LCD controller and a LCD panel, they
generally both
Quoted 1 line
use the same commands (DCS), the main difference is that DSI
is serial
Quoted 3 lines
and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All
the
Quoted 1 line
infrastucture to register a DSI host, DSI device etc. is
there. DSI
Quoted 1 line
panels are implemented as regular
drm_panelinstances, andtheir drivers
Quoted 1 line
go through the DSI API to communicate with the panel, which
makes them
Quoted 3 lines
independent of the DSI host driver.
DBI, on the other hand, does not have any of this. All (?) DBI
panels
Quoted 1 line
are implemented as tinydrm drivers, which make them impossible
to use
Quoted 1 line
with regular DRM drivers. Writing a standard
drm_paneldriveris
Quoted 1 line
impossible, as there is no concept of host and device. All
these tinydrm
Quoted 1 line
drivers register their own DBI host as they all do DBI over
SPI.
Quoted 2 lines
I think this needs a good cleanup. Given that DSI and DBI are
so
Quoted 9 lines
Quoted 1 line
similar, it would probably make sense to fuse DBI support into
the
Quoted 1 line
current DSI code, as trying to update DBI would result in a
lot of code
Quoted 1 line
being duplicated. With the proper host/device registration
mechanism
Quoted 1 line
from DSI code, it would be possible to turn most of the
tinydrm drivers
Quoted 1 line
into regular
drm_paneldrivers.Quoted 5 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
I'm trying to interface a ILI9331 based panel that has a DBI/8080
interface. The ILI9331 is very similar to the ILI9341 which already has a tinydrm driver. My SoC has a dedicated DBI/DSI controller, and I have currently no way to make it work with the ingenic-drm driver.
Quoted 6 lines
Quoted 3 lines
The idea of a generic
drm_paneltinydrm driver was to avoid
duplicating code between regular panel and tinydrm drivers, but the focus of my email was more to point that right now there is no way to interface a DBI panel with a regular DRM driver. Unlike DSI, there are currently no drivers with DBI support as there is no API to register a host DBI driver or a DBI panel driver. This is what's really missing here.Did you have a look at "Enable ili9341 and l3gd20 on stm32f429-disco" (http://lkml.kernel.org/r/[email protected]) from [email protected], it uses the STM32 DPI engine to feed a ili9341. Seems it would match your issue.
Note that DBI and DPI are different things. Here the ILI9341 uses SPI directly instead of a DBI API for sending its commands, which means the driver won't work on e.g. a 8080 bus.
-Paul
Quoted 67 lines
Quoted 67 lines
Quoted 65 lines
Quoted 32 lines
Quoted 3 lines
The problem then is that these should still be available as
tinydrm
Quoted 1 line
drivers. If the DSI/DBI panels can somehow register a
.update_fb()
Quoted 1 line
callback, it would make it possible to have a panel-agnostic
tinydrm
Quoted 1 line
driver, which would then probably open a lot of doors, and
help a lot to
Quoted 3 lines
clean the mess.
I think I can help with that, I just need some guidance - I am
fishing
Quoted 3 lines
in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
The problem with DBI is that it has reused other busses which
means we
don't have DBI drivers, we have SPI drivers instead (6800/8080
is not
avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.Quoted 3 lines
My initial tinydrm work used
drm_panel, but I was not allowed to
use it
(at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a
lot
of work exploring all the options, I'm fairly sure I suggesteddrm_paneleven back then but somehow it didn't really work. Would
be
good if we make sure we don't at least repeat history too much :-)Cheers, Daniel
Quoted 4 lines
Noralf.
Quoted 1 line
Quoted 8 lines
Quoted 4 lines
Cheers,
-Paul_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 4 lines
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 24.05.2020 20.35, skrev Daniel Vetter:
Quoted 61 lines · Noralf Trønnes
Quoted 32 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 21 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlThe problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
Quoted 9 lines
Quoted 2 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)
Unfortunately I don't have the two RFC series in my inbox anymore. I can see from this coverletter that drm_panel was removed after RFC v2:
drm: Add support for tiny LCD displays
https://patchwork.freedesktop.org/series/4520/
The problem is that there's no discussion in the relevant patch:
https://patchwork.freedesktop.org/patch/80117/?series=4520&rev=2
What I remember is that someone said I couldn't use it, then I replied that someone suggested drm_panel to me in an earlier discussion, but I couldn't remember who. Then Emil chimed in and said he was the one that suggested it.
Anyways let's see what Paul comes up with, if he finds a way to move SPI DBI over to drm_panel than I'm all for it. If not we'll just have to live with a hybrid solution I guess, one for MIPI DBI parallel bus for his hardware type and one for MIPI DBI SPI.
The Pi also has a hw block for parallel DBI, downstream there's a driver that treats it as a generic parallel bus, since it's an 8080 compatible bus. If I'm not mistaken the BeagleBone Black also has a bus like this.
When I started on tinydrm I had the idea to try and add a parallel bus type to Linux (even had a prototype for bit banging gpio) that I could use with DBI. This would make the bus available for things like FPGA's also, not just displays. I gave up on the idea since parallel DBI uses a lot of pins to upload a frame to display GRAM, much better to drive the panel directly through MIPI DPI (better fps), which all these SoC's also support.
Noralf.
Quoted 17 lines
Cheers, Daniel
Quoted 12 lines
Noralf.
Quoted 5 lines
Cheers,
-Paul_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 35 lines · Daniel Vetter
Quoted 32 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.
Quoted 22 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 16 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
Coming late to the party - the series looks like a great step forward.
Quoted 5 lines
Quoted 5 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
Quoted 9 lines
Quoted 2 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)
This pretty much ^^. Does anyone have a link/summary of the concerns?
From userspace POV - having these as panel makes sense. Currently as new tiny drm _driver_ gets added, userspace has to be updated to deal with it ... every so often.
Additionally having both DPI and DBI code for the given panel alongside one another makes the overall picture clearer.
-Emil
Aside: mipi_dbi API should grow a drm_ prefix.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 28.05.2020 17.27, skrev Emil Velikov:
Quoted 68 lines · Daniel Vetter
Quoted 35 lines · Noralf Trønnes
Quoted 32 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.Quoted 22 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 16 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlComing late to the party - the series looks like a great step forward.
Quoted 8 lines
Quoted 7 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).
Quoted 8 lines
Quoted 6 lines
Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)This pretty much ^^. Does anyone have a link/summary of the concerns?
I found the thread where you Emil suggested I look at drm_panel:
https://lists.freedesktop.org/archives/dri-devel/2015-September/091215.html
I used drm_panel in the tinydrm RFC's, but dropped it in version 1 according to the changelog. I think it was Thierry that didn't like how it was used, but I'm not entirely sure. Unfortunately I can't find the emails. There's nothing on the preceding RFC v2, so looks like it's gone somehow:
https://patchwork.freedesktop.org/patch/80117/?series=4520&rev=2
Noralf.
Quoted 10 lines
From userspace POV - having these as panel makes sense. Currently as new tiny drm _driver_ gets added, userspace has to be updated to deal with it ... every so often.
Additionally having both DPI and DBI code for the given panel alongside one another makes the overall picture clearer.
-Emil
Aside:mipi_dbiAPI should grow adrm_prefix.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Noralf,
Quoted 76 lines · Noralf Trønnes
Den 28.05.2020 17.27, skrev Emil Velikov:
Quoted 74 lines · Daniel Vetter
Quoted 35 lines · Noralf Trønnes
Quoted 32 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.Quoted 22 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 16 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlComing late to the party - the series looks like a great step forward.
Quoted 14 lines
Quoted 7 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)
Quoted 7 lines
Quoted 2 lines
This pretty much ^^. Does anyone have a link/summary of the concerns?
I found the thread where you Emil suggested I look at
drm_panel:https://lists.freedesktop.org/archives/dri-devel/2015-September/091215.html
Guilty as charged ;-)
Guess I should ask some silly questions first:
Was tinydrm modelled as a drm driver itself, because the idea of drm_panel::update() callback seemed dirty? That's the only concern raised that I can find on the list... It's effectively in the link you provided.
As far as I can tell, first RFC was already using the tiny drm driver model.
https://patchwork.freedesktop.org/patch/77161/
Yet again, do we actually need the callback? The mipi-dbi(?) spi panels in panel/ get away w/o one, while pushing far more pixels onto the screen (tiny has resolutions up-to 320x480, panel up-to 480x800).
That said, I'm a fan of lifting the tiny (panel) drivers into drm-panel and exposing them via dbi-bus sounds reasonable IMHO. Seems like Paul has the DT dbi/spi bus questions covered as well.
Patches illustrating his ideas would be more than welcome.
-Emil
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Emil,
Den 03.06.2020 22.25, skrev Emil Velikov:
Quoted 79 lines
Hi Noralf,
Quoted 76 lines · Noralf Trønnes
Den 28.05.2020 17.27, skrev Emil Velikov:
Quoted 74 lines · Daniel Vetter
Quoted 35 lines · Noralf Trønnes
Quoted 32 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 28 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.Quoted 22 lines
Do we have drivers with dbi support that actually want to reuse the tinydrm drivers? Good clean is all good, but we need a solid reason for changing stuff. Plus we need to make sure we're not just rediscovering all the old reasons for why we ended up where we are right now in the first place.
Quoted 16 lines
Quoted 10 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlComing late to the party - the series looks like a great step forward.
Quoted 14 lines
Quoted 7 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Hm, do we have a summary of all the discussions/reasons from back then? All I remember is that it's all that simple, you've done a lot of work exploring all the options, I'm fairly sure I suggested
drm_paneleven back then but somehow it didn't really work. Would be good if we make sure we don't at least repeat history too much :-)
Quoted 9 lines
Quoted 7 lines
Quoted 2 lines
This pretty much ^^. Does anyone have a link/summary of the concerns?
I found the thread where you Emil suggested I look at
drm_panel:https://lists.freedesktop.org/archives/dri-devel/2015-September/091215.html
Guilty as charged ;-)
I guess it turns out that you were right :-)
Quoted 14 lines
Guess I should ask some silly questions first:
Was tinydrm modelled as a drm driver itself, because the idea ofdrm_panel::update()callback seemed dirty? That's the only concern raised that I can find on the list... It's effectively in the link you provided.As far as I can tell, first RFC was already using the tiny drm driver model.
https://patchwork.freedesktop.org/patch/77161/Yet again, do we actually need the callback? The mipi-dbi(?) spi panels in panel/ get away w/o one, while pushing far more pixels onto the screen (tiny has resolutions up-to 320x480, panel up-to 480x800).
Quoted 6 lines
That said, I'm a fan of lifting the tiny (panel) drivers into drm-panel and exposing them via dbi-bus sounds reasonable IMHO. Seems like Paul has the DT dbi/spi bus questions covered as well.
Patches illustrating his ideas would be more than welcome.
+1
When Paul has found a solution for his hw we'll find a way to integrate support for these MIPI DBI SPI drivers.
Noralf.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Noralf,
Quoted 57 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 46 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI
and
DBI panels.Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally
both
use the same commands (DCS), the main difference is that DSI is
serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their
drivers
go through the DSI API to communicate with the panel, which makes
them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI
panels
are implemented as tinydrm drivers, which make them impossible to
use
with regular DRM drivers. Writing a standarddrm_paneldriver is impossible, as there is no concept of host and device. All these
tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of
code
being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm
drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a
lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am
fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
Quoted 7 lines
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlThe problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
I don't think that should be much of a problem. You could have a DBI/SPI bridge, that wraps a SPI device into a DBI host, for instance. The panel drivers would just use the DBI API without having to know what's done behind the scene.
Cheers,
-Paul
Quoted 10 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 59 lines
Hi Noralf,
Quoted 48 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 38 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers
go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to
clean the mess.Quoted 4 lines
I think I can help with that, I just need some guidance - I am fishing in exotic seas here.
Thoughts, comments, are very welcome.
I did look at this a few months back:
Quoted 7 lines
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlThe problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
Quoted 4 lines
I don't think that should be much of a problem. You could have a DBI/SPI bridge, that wraps a SPI device into a DBI host, for instance. The panel drivers would just use the DBI API without having to know what's done behind the scene.
This will be a bridge implemented in software, are we allowed to have software devices in the Device Tree? I though it was just allowed to describe hardware.
Noralf.
Quoted 17 lines
Cheers,
-PaulQuoted 10 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it (at least not the way I had done it).Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 89 lines · Noralf Trønnes
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 78 lines
Hi Noralf,
Quoted 65 lines · Noralf Trønnes
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 52 lines
Hi list,
I'd like to open a discussion about the current support of MIPI
DSI and
DBI panels.Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they
generally both
use the same commands (DCS), the main difference is that DSI is
serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there.
DSI
panels are implemented as regulardrm_panelinstances, and their
drivers
go through the DSI API to communicate with the panel, which
makes them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI
panels
are implemented as tinydrm drivers, which make them impossible
to use
with regular DRM drivers. Writing a standarddrm_paneldriver is impossible, as there is no concept of host and device. All these
tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into
the
current DSI code, as trying to update DBI would result in a lot
of code
being duplicated. With the proper host/device registration
mechanism
from DSI code, it would be possible to turn most of the tinydrm
drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as
tinydrm
drivers. If the DSI/DBI panels can somehow register a
.update_fb()
callback, it would make it possible to have a panel-agnostic
tinydrm
driver, which would then probably open a lot of doors, and help a
lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am
fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
Quoted 8 lines
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
The problem with DBI is that it has reused other busses which
means we
don't have DBI drivers, we have SPI drivers instead (6800/8080 is
not
avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.Quoted 7 lines
I don't think that should be much of a problem. You could have a
DBI/SPI
bridge, that wraps a SPI device into a DBI host, for instance. The
panel
drivers would just use the DBI API without having to know what's
done
behind the scene.
Quoted 3 lines
This will be a bridge implemented in software, are we allowed to have software devices in the Device Tree? I though it was just allowed to describe hardware.
It wouldn't appear in devicetree. If the panel is connected over SPI, then DBI is just the protocol it uses.
If probed as a SPI device driver, the panel's spi_driver would register an instance of the DBI/SPI host driver, then register itself as a dbi_driver. If probed from a DBI host it would just register itself as a dbi_driver.
-Paul
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
My initial tinydrm work used
drm_panel, but I was not allowed to
use it
(at least not the way I had done it).Noralf.
Quoted 1 line
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 24.05.2020 22.42, skrev Paul Cercueil:
Quoted 84 lines · Noralf Trønnes
Quoted 81 lines
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 77 lines
Hi Noralf,
Le dim. 24 mai 2020 à 19:46, Noralf Trønnes <[email protected]> a écrit :
Quoted 62 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 46 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and
DBI panels.Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both
use the same commands (DCS), the main difference is that DSI is serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers
go through the DSI API to communicate with the panel, which makes them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels
are implemented as tinydrm drivers, which make them impossible to use
with regular DRM drivers. Writing a standarddrm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code
being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlQuoted 4 lines
The problem with DBI is that it has reused other busses which means we don't have DBI drivers, we have SPI drivers instead (6800/8080 is not avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.
I don't think that should be much of a problem. You could have a DBI/SPI
bridge, that wraps a SPI device into a DBI host, for instance. The panel
drivers would just use the DBI API without having to know what's done behind the scene.
Quoted 6 lines
Quoted 3 lines
This will be a bridge implemented in software, are we allowed to have software devices in the Device Tree? I though it was just allowed to describe hardware.
It wouldn't appear in devicetree. If the panel is connected over SPI, then DBI is just the protocol it uses.
How do you attach a panel to the DBI device if it doesn't appear in DT? Another problem is that the DBI panel uses SPI both for framebuffer upload and controller initialization. How shall this be handled when the panel driver needs SPI for init and the DBI bridge needs SPI for frame upload?
Noralf.
Quoted 26 lines
If probed as a SPI device driver, the panel's
spi_driverwould register an instance of the DBI/SPI host driver, then register itself as adbi_driver. If probed from a DBI host it would just register itself as adbi_driver.-Paul
Quoted 15 lines
Quoted 15 lines
Quoted 12 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it
(at least not the way I had done it).Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 122 lines · Noralf Trønnes
Den 24.05.2020 22.42, skrev Paul Cercueil:
Quoted 119 lines
Quoted 114 lines · Noralf Trønnes
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 97 lines
Hi Noralf,
Le dim. 24 mai 2020 à 19:46, Noralf Trønnes
<[email protected]> a
écrit :Quoted 83 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 66 lines
Hi list,
I'd like to open a discussion about the current support of
MIPI
DSI and
DBI panels.Both are standards from the MIPI alliance, both are
communication
protocols between a LCD controller and a LCD panel, they
generally both
use the same commands (DCS), the main difference is that DSI
is
serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All
the
infrastucture to register a DSI host, DSI device etc. is
there. DSI
panels are implemented as regulardrm_panelinstances, and
their
drivers
go through the DSI API to communicate with the panel, which
makes
them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI
panels
are implemented as tinydrm drivers, which make them
impossible to
use
with regular DRM drivers. Writing a standarddrm_paneldriver
is
impossible, as there is no concept of host and device. All
these
tinydrm
drivers register their own DBI host as they all do DBI over
SPI.I think this needs a good cleanup. Given that DSI and DBI are
so
similar, it would probably make sense to fuse DBI support
into the
current DSI code, as trying to update DBI would result in a
lot
of code
being duplicated. With the proper host/device registration
mechanism
from DSI code, it would be possible to turn most of the
tinydrm
drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as
tinydrm
drivers. If the DSI/DBI panels can somehow register a
.update_fb()
callback, it would make it possible to have a panel-agnostic
tinydrm
driver, which would then probably open a lot of doors, and
help a
lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am
fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
Quoted 8 lines
The problem with DBI is that it has reused other busses which
means we
don't have DBI drivers, we have SPI drivers instead (6800/8080
is not
avail. as busses in Linux yet). DSI and DPI on the other hand
has
dedicated hw controller drivers not shared with other
subsystems.Quoted 8 lines
I don't think that should be much of a problem. You could have a
DBI/SPI
bridge, that wraps a SPI device into a DBI host, for instance.
The
panel
drivers would just use the DBI API without having to know what's
done
behind the scene.This will be a bridge implemented in software, are we allowed to
have
software devices in the Device Tree? I though it was just allowed
to
describe hardware.
Quoted 5 lines
Quoted 3 lines
It wouldn't appear in devicetree. If the panel is connected over
SPI,
then DBI is just the protocol it uses.How do you attach a panel to the DBI device if it doesn't appear in DT?
When probed from a DBI host controller, the panel's devicetree binding would look like this:
&dbi_host {
panel {
compatible = "my,dbi-device"; };
};
When probed from SPI it would appear in DT like this:
&spi {
panel@0 {
reg = <0>;
compatible = "my,dbi-device-spi"; };
};
In that case, the driver would create a SPI-DBI bridge, but that is an implementation detail that doesn't belong in devicetree.
Quoted 4 lines
Another problem is that the DBI panel uses SPI both for framebuffer upload and controller initialization. How shall this be handled when the panel driver needs SPI for init and the DBI bridge needs SPI for frame upload?
Does the panel driver need SPI for init? I don't think so. It needs to send DBI commands over SPI, yes. Only the DBI-SPI bridge would control the SPI device.
-Paul
Quoted 18 lines
Quoted 18 lines
If probed as a SPI device driver, the panel's
spi_driverwould
register
an instance of the DBI/SPI host driver, then register itself as adbi_driver. If probed from a DBI host it would just register itself
as a
dbi_driver.-Paul
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
My initial tinydrm work used
drm_panel, but I was not allowed to
use it
(at least not the way I had done it).Noralf.
Quoted 1 line
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 24.05.2020 23.33, skrev Paul Cercueil:
Quoted 125 lines · Noralf Trønnes
Quoted 99 lines
Den 24.05.2020 22.42, skrev Paul Cercueil:
Quoted 96 lines
Le dim. 24 mai 2020 à 22:14, Noralf Trønnes <[email protected]> a écrit :
Quoted 92 lines
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 88 lines
Hi Noralf,
Le dim. 24 mai 2020 à 19:46, Noralf Trønnes <[email protected]> a écrit :
Quoted 70 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 52 lines
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and
DBI panels.Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both
use the same commands (DCS), the main difference is that DSI is serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI
panels are implemented as regulardrm_panelinstances, and their drivers
go through the DSI API to communicate with the panel, which makes them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels
are implemented as tinydrm drivers, which make them impossible to use
with regular DRM drivers. Writing a standarddrm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the
current DSI code, as trying to update DBI would result in a lot of code
being duplicated. With the proper host/device registration mechanism
from DSI code, it would be possible to turn most of the tinydrm drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as tinydrm
drivers. If the DSI/DBI panels can somehow register a .update_fb()
callback, it would make it possible to have a panel-agnostic tinydrm
driver, which would then probably open a lot of doors, and help a lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlQuoted 6 lines
The problem with DBI is that it has reused other busses which means we
don't have DBI drivers, we have SPI drivers instead (6800/8080 is not
avail. as busses in Linux yet). DSI and DPI on the other hand has dedicated hw controller drivers not shared with other subsystems.I don't think that should be much of a problem. You could have a DBI/SPI
bridge, that wraps a SPI device into a DBI host, for instance. The panel
drivers would just use the DBI API without having to know what's done
behind the scene.Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
This will be a bridge implemented in software, are we allowed to have software devices in the Device Tree? I though it was just allowed to describe hardware.
It wouldn't appear in devicetree. If the panel is connected over SPI, then DBI is just the protocol it uses.
How do you attach a panel to the DBI device if it doesn't appear in DT?
When probed from a DBI host controller, the panel's devicetree binding would look like this:
&dbi_host{panel {
compatible = "my,dbi-device";
};
};When probed from SPI it would appear in DT like this:
&spi {
Quoted 8 lines
panel@0 {
reg = <0>;
compatible = "my,dbi-device-spi";
};
};In that case, the driver would create a SPI-DBI bridge, but that is an implementation detail that doesn't belong in devicetree.
You said that you want to turn the tinydrm drivers into regular drm_panel drivers. If this is a drm_panel driver, who calls drm_of_find_panel_or_bridge() to make use of it? Or is this drm_panel driver a full blown DRM driver?
(btw. tinydrm.ko is gone now, all drivers in tiny/ are regular DRM drivers)
I'm curious, what kind of device is going to use this? It's a bit strange to spend so many pins on the display interface and choose DBI instead of DPI.
Noralf.
Quoted 7 lines
Quoted 6 lines
Another problem is that the DBI panel uses SPI both for framebuffer upload and controller initialization. How shall this be handled when the panel driver needs SPI for init and the DBI bridge needs SPI for frame upload?
Quoted 36 lines
Does the panel driver need SPI for init? I don't think so. It needs to send DBI commands over SPI, yes. Only the DBI-SPI bridge would control the SPI device.
-Paul
Quoted 27 lines
Quoted 27 lines
If probed as a SPI device driver, the panel's
spi_driverwould register an instance of the DBI/SPI host driver, then register itself as adbi_driver. If probed from a DBI host it would just register itself as a
dbi_driver.-Paul
Quoted 15 lines
Quoted 15 lines
Quoted 12 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it
(at least not the way I had done it).Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 167 lines · Noralf Trønnes
Den 24.05.2020 23.33, skrev Paul Cercueil:
Quoted 164 lines
Quoted 132 lines · Noralf Trønnes
Den 24.05.2020 22.42, skrev Paul Cercueil:
Quoted 129 lines
Le dim. 24 mai 2020 à 22:14, Noralf Trønnes
<[email protected]> a
écrit :Quoted 123 lines
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 104 lines
Hi Noralf,
Le dim. 24 mai 2020 à 19:46, Noralf Trønnes
<[email protected]> a
écrit :Quoted 89 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:Quoted 69 lines
Hi list,
I'd like to open a discussion about the current support of
MIPI
DSI and
DBI panels.Both are standards from the MIPI alliance, both are
communication
protocols between a LCD controller and a LCD panel, they
generally both
use the same commands (DCS), the main difference is that
DSI is
serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented.
All the
infrastucture to register a DSI host, DSI device etc. is
there. DSI
panels are implemented as regulardrm_panelinstances, and
their
drivers
go through the DSI API to communicate with the panel,
which makes
them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?)
DBI
panels
are implemented as tinydrm drivers, which make them
impossible to
use
with regular DRM drivers. Writing a standarddrm_panel
driver is
impossible, as there is no concept of host and device. All
these
tinydrm
drivers register their own DBI host as they all do DBI
over SPI.I think this needs a good cleanup. Given that DSI and DBI
are so
similar, it would probably make sense to fuse DBI support
into
the
current DSI code, as trying to update DBI would result in
a lot
of code
being duplicated. With the proper host/device registration
mechanism
from DSI code, it would be possible to turn most of the
tinydrm
drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as
tinydrm
drivers. If the DSI/DBI panels can somehow register a
.update_fb()
callback, it would make it possible to have a
panel-agnostic
tinydrm
driver, which would then probably open a lot of doors, and
help a
lot to
clean the mess.Quoted 6 lines
I think I can help with that, I just need some guidance -
I am
fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.html
Quoted 9 lines
The problem with DBI is that it has reused other busses which
means we
don't have DBI drivers, we have SPI drivers instead
(6800/8080
is not
avail. as busses in Linux yet). DSI and DPI on the other
hand has
dedicated hw controller drivers not shared with other
subsystems.Quoted 10 lines
I don't think that should be much of a problem. You could
have a
DBI/SPI
bridge, that wraps a SPI device into a DBI host, for
instance. The
panel
drivers would just use the DBI API without having to know
what's
done
behind the scene.This will be a bridge implemented in software, are we allowed
to have
software devices in the Device Tree? I though it was just
allowed to
describe hardware.Quoted 6 lines
Quoted 3 lines
It wouldn't appear in devicetree. If the panel is connected over
SPI,
then DBI is just the protocol it uses.How do you attach a panel to the DBI device if it doesn't appear
in DT?When probed from a DBI host controller, the panel's devicetree
binding
would look like this:
&dbi_host{panel { compatible = "my,dbi-device"; };};
When probed from SPI it would appear in DT like this:
&spi {
panel@0 { reg = <0>; compatible = "my,dbi-device-spi"; };};
Quoted 8 lines
Quoted 3 lines
In that case, the driver would create a SPI-DBI bridge, but that is
an
implementation detail that doesn't belong in devicetree.You said that you want to turn the tinydrm drivers into regular
drm_paneldrivers. If this is adrm_paneldriver, who callsdrm_of_find_panel_or_bridge()to make use of it? Or is thisdrm_paneldriver a full blown DRM driver?
What I had in mind was a generic tinydrm driver that fetched the drm_panel from devicetree. Which is what you were working on, right?
Quoted 5 lines
(btw. tinydrm.ko is gone now, all drivers in tiny/ are regular DRM drivers)
I'm curious, what kind of device is going to use this? It's a bit strange to spend so many pins on the display interface and choose DBI instead of DPI.
I'm not sure the number of pins changes that much between the two, does it? Here I have 16 pins for command/data, one pin for command/data signal, and the pixel clock.
DBI has advantages over DPI, e.g. you don't need a separate SPI/I2C to configure the panel, and data is only transferred when a new frame is available, which means power savings when displaying still images, or a variable refresh rate when displaying video.
-Paul
Quoted 37 lines
Quoted 37 lines
Quoted 8 lines
Another problem is that the DBI panel uses SPI both for framebuffer upload and controller initialization. How shall this be handled
when the
panel driver needs SPI for init and the DBI bridge needs SPI for
frame
upload?Does the panel driver need SPI for init? I don't think so. It needs
to
send DBI commands over SPI, yes. Only the DBI-SPI bridge would
control
the SPI device.-Paul
Quoted 20 lines
Quoted 20 lines
If probed as a SPI device driver, the panel's
spi_driverwould
register
an instance of the DBI/SPI host driver, then register itself as adbi_driver. If probed from a DBI host it would just register
itself
as a
dbi_driver.-Paul
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
My initial tinydrm work used
drm_panel, but I was not
allowed to
use it
(at least not the way I had done it).Noralf.
Quoted 1 line
Quoted 13 lines
Quoted 13 lines
Quoted 10 lines
Quoted 10 lines
Quoted 7 lines
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Den 25.05.2020 04.05, skrev Paul Cercueil:
Quoted 165 lines · Noralf Trønnes
Quoted 162 lines
Den 24.05.2020 23.33, skrev Paul Cercueil:
Quoted 158 lines
Le dim. 24 mai 2020 à 23:24, Noralf Trønnes <[email protected]> a écrit :
Quoted 125 lines
Den 24.05.2020 22.42, skrev Paul Cercueil:
Quoted 122 lines
Le dim. 24 mai 2020 à 22:14, Noralf Trønnes <[email protected]> a écrit :
Quoted 117 lines
Den 24.05.2020 21.54, skrev Paul Cercueil:
Quoted 100 lines
Hi Noralf,
Le dim. 24 mai 2020 à 19:46, Noralf Trønnes
<[email protected]> a
écrit :Quoted 86 lines
Den 24.05.2020 18.13, skrev Paul Cercueil:
Quoted 66 lines
Hi list,
I'd like to open a discussion about the current support of MIPI
DSI and
DBI panels.Both are standards from the MIPI alliance, both are communication
protocols between a LCD controller and a LCD panel, they generally both
use the same commands (DCS), the main difference is that DSI is
serial
and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the
infrastucture to register a DSI host, DSI device etc. is there. DSI
panels are implemented as regulardrm_panelinstances, and their
drivers
go through the DSI API to communicate with the panel, which makes
them
independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels
are implemented as tinydrm drivers, which make them impossible to
use
with regular DRM drivers. Writing a standarddrm_paneldriver is
impossible, as there is no concept of host and device. All these
tinydrm
drivers register their own DBI host as they all do DBI over SPI.I think this needs a good cleanup. Given that DSI and DBI are so
similar, it would probably make sense to fuse DBI support into the
current DSI code, as trying to update DBI would result in a lot
of code
being duplicated. With the proper host/device registration mechanism
from DSI code, it would be possible to turn most of the tinydrm
drivers
into regulardrm_paneldrivers.The problem then is that these should still be available as tinydrm
drivers. If the DSI/DBI panels can somehow register a .update_fb()
callback, it would make it possible to have a panel-agnostic tinydrm
driver, which would then probably open a lot of doors, and help a
lot to
clean the mess.Quoted 5 lines
I think I can help with that, I just need some guidance - I am fishing
in exotic seas here.Thoughts, comments, are very welcome.
I did look at this a few months back:
drm/mipi-dbi: Support panel drivers
https://lists.freedesktop.org/archives/dri-devel/2019-August/228966.htmlQuoted 8 lines
The problem with DBI is that it has reused other busses which means we
don't have DBI drivers, we have SPI drivers instead (6800/8080 is not
avail. as busses in Linux yet). DSI and DPI on the other hand has
dedicated hw controller drivers not shared with other subsystems.Quoted 8 lines
I don't think that should be much of a problem. You could have a DBI/SPI
bridge, that wraps a SPI device into a DBI host, for instance. The
panel
drivers would just use the DBI API without having to know what's done
behind the scene.This will be a bridge implemented in software, are we allowed to have
software devices in the Device Tree? I though it was just allowed to
describe hardware.Quoted 6 lines
Quoted 3 lines
It wouldn't appear in devicetree. If the panel is connected over SPI,
then DBI is just the protocol it uses.How do you attach a panel to the DBI device if it doesn't appear in DT?
When probed from a DBI host controller, the panel's devicetree binding would look like this:
&dbi_host {
panel {
compatible = "my,dbi-device";
};
};When probed from SPI it would appear in DT like this:
&spi {
panel@0 {
reg = <0>;
compatible = "my,dbi-device-spi";
};
};In that case, the driver would create a SPI-DBI bridge, but that is an implementation detail that doesn't belong in devicetree.
Quoted 8 lines
Quoted 4 lines
You said that you want to turn the tinydrm drivers into regular
drm_paneldrivers. If this is adrm_paneldriver, who callsdrm_of_find_panel_or_bridge()to make use of it? Or is thisdrm_paneldriver a full blown DRM driver?What I had in mind was a generic tinydrm driver that fetched the
drm_panelfrom devicetree. Which is what you were working on, right?
Ok, I guess was confused by the DBI SPI bridge term and figured this was a DBI device that panel devices was attached to. My proposal was turning a DRM panel driver into a full blown DRM driver which AFAIR was what I was not allowed to do when working on tinydrm. The reason I didn't take my work any further is because Thierry didn't take interest in it, he would need to be ok with turning drm_panel drivers into regular DRM drivers.
Noralf.
Quoted 11 lines
Quoted 6 lines
(btw. tinydrm.ko is gone now, all drivers in tiny/ are regular DRM drivers)
I'm curious, what kind of device is going to use this? It's a bit strange to spend so many pins on the display interface and choose DBI instead of DPI.
I'm not sure the number of pins changes that much between the two, does it? Here I have 16 pins for command/data, one pin for command/data signal, and the pixel clock.
Quoted 55 lines
DBI has advantages over DPI, e.g. you don't need a separate SPI/I2C to configure the panel, and data is only transferred when a new frame is available, which means power savings when displaying still images, or a variable refresh rate when displaying video.
-Paul
Quoted 45 lines
Quoted 45 lines
Quoted 7 lines
Another problem is that the DBI panel uses SPI both for framebuffer upload and controller initialization. How shall this be handled when the
panel driver needs SPI for init and the DBI bridge needs SPI for frame upload?Does the panel driver need SPI for init? I don't think so. It needs to send DBI commands over SPI, yes. Only the DBI-SPI bridge would control the SPI device.
-Paul
Quoted 28 lines
Quoted 28 lines
If probed as a SPI device driver, the panel's
spi_driverwould register
an instance of the DBI/SPI host driver, then register itself as adbi_driver. If probed from a DBI host it would just register itself as a
dbi_driver.-Paul
Quoted 15 lines
Quoted 15 lines
Quoted 12 lines
My initial tinydrm work used
drm_panel, but I was not allowed to use it
(at least not the way I had done it).Noralf.
Quoted 5 lines
Cheers,
-Paul
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Paul.
Quoted 22 lines · Paul Cercueil
Hi list,
I'd like to open a discussion about the current support of MIPI DSI and DBI panels.
Both are standards from the MIPI alliance, both are communication protocols between a LCD controller and a LCD panel, they generally both use the same commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.
In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI panels are implemented as regular
drm_panelinstances, and their drivers go through the DSI API to communicate with the panel, which makes them independent of the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI panels are implemented as tinydrm drivers, which make them impossible to use with regular DRM drivers. Writing a standard
drm_paneldriver is impossible, as there is no concept of host and device. All these tinydrm drivers register their own DBI host as they all do DBI over SPI.
Quoted 5 lines
I think this needs a good cleanup. Given that DSI and DBI are so similar, it would probably make sense to fuse DBI support into the current DSI code, as trying to update DBI would result in a lot of code being duplicated. With the proper host/device registration mechanism from DSI code, it would be possible to turn most of the tinydrm drivers into regular
drm_paneldrivers.
We could add proper support for a DBI bus, like we have today for DSI. This seems like the simple approach as we then have a DSI and a DBI bus.
But many panels implement support for both DSI and DBI and then what to do then? We could register a driver based on the configuration like we do in some drivers already. But this would push logic to the dirvers which we would like to keep simple.
We could also try to extend the current DSI bus support to cover DBI too - but thats seems also to be not so elegant.
I atually started on the framework bits for implementing a DBI bus but got sidetracked so did not get far.
And back then I also was concerned if we should go for a dedicated DBI bus or we should do something else.
I have attached two WIP patches from when I looked at it. The binding needs extra work and the code may not even build...
Quoted 4 lines
The problem then is that these should still be available as tinydrm drivers. If the DSI/DBI panels can somehow register a .update_fb() callback, it would make it possible to have a panel-agnostic tinydrm driver, which would then probably open a lot of doors, and help a lot to clean the mess.
We should find a clean solution for new drivers and then we can see what to do for the existing drivers.
We only have a few existing tiny drivers for now - and knowing the amount of panel candidates that exist we have to make it simple to add support for new panels, both DBI, DSI and DPI variants.
And if we could then find a way to allow the user to specify the init sequence without modifying the kernel then we could make it much simpler again. Noralf have a solution for this in staging but I think we need something else in DRM.
I have had in mind if we could ut something in initrd or some sort but that is down on the TODO list to look at.
Sam
From 228da4a6e96e18e68f992d3eb9f269383e96bc3e Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Sat, 8 Feb 2020 11:31:03 +0100
Subject: [PATCH 1/2] dt-bindings: display: add MIPI DBI bus
Add binding for a GPIO based MIPI DBI bus.
The binding describes Type A and Type B.
Type C, that uses SPI, is not covered by the binding.
--- .../bindings/display/mipi-dbi-bus.yaml | 162 ++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/mipi-dbi-bus.yaml
Documentation/devicetree/bindings/display/mipi-dbi-bus.yaml new file +162 -0
@@ -0,0 +1,162 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/mipi-dbi-bus.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: MIPI DBI (Display Bus Interface) bus + +maintainers: + - Sam Ravnborg <[email protected]> + +description: | + MIPI DBI describes a bus interface which is used for display panels. + MIPI DBI can be configured for different bus widths. + + This documents describes the bindings used to represent HW that + is compatible with MIPI DBI - using GPIOs for signalling. + + Only MIPI DBI Type 1 interfaces are supported by this binding. + There are three types of type 1 interfaces respectively: + - Type A: Motorola 6800 type parallel bus + Type A interface can either be "Fixed E" or "Clocked E". + Bus width is either 8, 9 or 16 bits. + Type A interfaces uses the same signal for read and write - R/WX + - Type B: Intel 8080 type parallel bus + Bus width is either 8, 9 or 16 bits. + Type B interfaces uses dedicated signals for read and write - RDX and WRX. + - C. SPI type with 3 options: + Option 1: 9-bit with the Data/Command signal as the ninth bit + Option 2: Same as above except it's sent as 16 bits + Option 3: 8-bit with the Data/Command signal as a separate D/CX pin + + The following ascii picture shows the signals between CPU and a display. + The picture uses 8080 mode + +-----+ +---------+ + | |---read---->| | + | CPU |---write--->| display | + | |---dc------>| | + | |---cs------>| | + | |<==data[]==>| | + | |---reset--->| | + +-----+ +---------+ + + The MIPI DBI bus can include several displays, each with their + individual chip selct - CSX. + All displays must use the same type of interface. + The displays are represented as child nodes of the mipi-dbi node, + each with a reg property that is an index to the chip selects + specified in the dbi node. + +properties: + # MIPI DBI Bus properties + $nodename: + pattern: "^dbi(@.*|-[0-9a-f])*$" + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + mipi-dbi-type: + enum: + - dbi-type-1-a + - dbi-type-1-b + - dbi-type-1-c + description: | + Define the type of MIPI DBI interface, either type a, b or c. + + rw-gpios: + description: | + GPIO for the read/write (R/WX) signal - used for 6800 (type-1-a). + Data is read when high, and written when low. + + read-gpios: + description: | + GPIO for the read (RDX) signal - used for 8080 (type-1-b) + The CPU read data at the rising edge. + + write-gpios: + description: | + GPIO for the write (WRX) signal - used for 8080 (type-1-b). + The CPU writes data at the rising edge. + + dc-gpios: + description: | + Data/command selection (D/CX). + Used for 6800 (type-1-a) and 8080 (type-1-b). + Data when high, and command when low. + + data-gpios: + minItems: 8 + maxItems: 16 + description: | + An array of either 4, 8 or 9 GPIO specifiers. + 8 - 8-bit mode D[7:0] + 9 - 9-bit mode D[8:0] + 16 - 19-bit mode D[15:0] + + e-clock-gpios: + description: | + In Clocked E mode the CPU writes data at falling edge + and reads data at rising edge + + te-gpios: + description: Tearing effect synchronization signal + + reset-gpios: + description: Reset signal + + cs-gpios: + minItems: 1 + maxItems: 8 + description: GPIOs to use for chipselect lines + +patternProperties: + "^panel@[0-7]$": + description: Display panels connected to the DBI bus + type: object + +required: + - mipi-dbi-type + +additionalProperties: false + +examples: + - | + dbi { + mipi-dbi-type = "dbi-type-1-b"; + #address-cells = <1>; + #size-cells = <0>; + read-gpios = <&pioA 7 0>; + write-gpios = <&pioA 8 0>; + dc-gpios = <&pioA 9 0>; + data-gpios = <&pioB 0 0>, + <&pioB 1 0>, + <&pioB 2 0>, + <&pioB 3 0>, + <&pioB 4 0>, + <&pioB 5 0>, + <&pioB 6 0>, + <&pioB 7 0>; + reset-gpios = <&pioA 2 0>; + + /* Two displays 0 and 1 */ + cs-gpios = <&pioC 0 0>, + <&pioC 1 0>; + + panel@0 { + compatible = "hit,hd44780-dbi"; + reg = <0>; + backlight = <&gpio_backlight>; + }; + + panel@1 { + compatible = "winstar,foo-dbi"; + reg = <1>; + backlight = <&bl_pwm>; + }; + }; + +...
Signature · 1 line
2.25.1
From 158322e3f55b614c20e186111fdf23a47e375931 Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <[email protected]>
Date: Sat, 8 Feb 2020 21:51:02 +0100
Subject: [PATCH 2/2] drm: add MIPI DBI bus infrastructure
Add infrastructure to register MIPI DBI display drivers. The code is more or less a straight copy from drm_mipi_dsi with adaptions like host => display etc.
--- drivers/gpu/drm/drm_mipi_dbi.c | 247 +++++++++++++++++++++++++++++++++ include/drm/drm_mipi_dbi.h | 135 ++++++++++++++++++ 2 files changed, 382 insertions(+)
drivers/gpu/drm/drm_mipi_dbi.c +247 -0
257 lines not on this page · raw message
include/drm/drm_mipi_dbi.h +135 -0
165 lines not on this page · raw message
Signature · 1 line
2.25.1
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi Sam,
Quoted 49 lines · Sam Ravnborg
Hi Paul.
Quoted 32 lines · Paul Cercueil
Hi list,
I'd like to open a discussion about the current support of MIPI DSI
and DBI
panels.Both are standards from the MIPI alliance, both are communication
protocols
between a LCD controller and a LCD panel, they generally both use
the same
commands (DCS), the main difference is that DSI is serial and DBI is generally parallel.In the kernel right now, DSI is pretty well implemented. All the infrastucture to register a DSI host, DSI device etc. is there. DSI
panels
are implemented as regulardrm_panelinstances, and their drivers
go through
the DSI API to communicate with the panel, which makes them
independent of
the DSI host driver.DBI, on the other hand, does not have any of this. All (?) DBI
panels are
implemented as tinydrm drivers, which make them impossible to use
with
regular DRM drivers. Writing a standarddrm_paneldriver is
impossible, as
there is no concept of host and device. All these tinydrm drivers
register
their own DBI host as they all do DBI over SPI.Quoted 10 lines
I think this needs a good cleanup. Given that DSI and DBI are so
similar, it
would probably make sense to fuse DBI support into the current DSI
code, as
trying to update DBI would result in a lot of code being
duplicated. With
the proper host/device registration mechanism from DSI code, it
would be
possible to turn most of the tinydrm drivers into regulardrm_panel
drivers.We could add proper support for a DBI bus, like we have today for DSI. This seems like the simple approach as we then have a DSI and a DBI bus.
Quoted 6 lines
But many panels implement support for both DSI and DBI and then what to do then? We could register a driver based on the configuration like we do in some drivers already. But this would push logic to the dirvers which we would like to keep simple.
We could also try to extend the current DSI bus support to cover DBI too - but thats seems also to be not so elegant.
My controller supports 8/16/18-bit commands, 8/16/18-bit data, serial or parallel. There is nothing DBI-specific in that, but there is nothing DSI-specific either; it is more of a bus controller, on which the DSI and DBI protocols can be used. I think the way to go would be to separate the buses from the protocols. Ideally, I would have a bus driver, with "mipi-dsi" and "mipi-dbi-8080" flags in devicetree, and the core's DSI/DBI code would work on top of the bus API.
Quoted 7 lines
I atually started on the framework bits for implementing a DBI bus but got sidetracked so did not get far.
And back then I also was concerned if we should go for a dedicated DBI bus or we should do something else.I have attached two WIP patches from when I looked at it. The binding needs extra work and the code may not even build...
The code looks pretty much like what I was experimenting with before sending the email. But I think we can do better.
The binding specifies the 'mipi-dbi-type' while in practice the same hardware may be able to support several types, and specifies a bunch of GPIOs which wouldn't apply in my case (since they are handled by the controller).
Quoted 9 lines
Quoted 7 lines
The problem then is that these should still be available as tinydrm
drivers.
If the DSI/DBI panels can somehow register a .update_fb() callback,
it would
make it possible to have a panel-agnostic tinydrm driver, which
would then
probably open a lot of doors, and help a lot to clean the mess.We should find a clean solution for new drivers and then we can see what to do for the existing drivers.
Agreed.
Cheers,
-Paul
Quoted 4 lines
We only have a few existing tiny drivers for now - and knowing the amount of panel candidates that exist we have to make it simple to add support for new panels, both DBI, DSI and DPI variants.
Quoted 8 lines
And if we could then find a way to allow the user to specify the init sequence without modifying the kernel then we could make it much simpler again. Noralf have a solution for this in staging but I think we need something else in DRM.
I have had in mind if we could ut something in initrd or some sort but that is down on the TODO list to look at.Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel