mbox series

[0/2] Docs/EDID: Fixed and improved EDID documentation

Message ID 1541407715-5417-1-git-send-email-cniedermaier@dh-electronics.de (mailing list archive)
Headers show
Series Docs/EDID: Fixed and improved EDID documentation | expand

Message

Christoph Niedermaier Nov. 5, 2018, 8:48 a.m. UTC
A problem was found when EDID data sets for displays other
than the provided samples were generated. The patch series has
no effect on the provided samples that still match the data
used in drivers/gpu/drm/drm_edid_load.c.
The provided samples use small values for XOFFSET, XPULSE,
YOFFSET and YPULSE, where the error doesn't occur. This fix
corrects the use of that values in case of high values, because
the most significant bits were treated incorrectly.

The previous version made it necessary to first generate an
EDID data set without correct CRC and then to fix the CRC in
a second step. This patch series adds the CRC calculation to the
makefile in such a way that a correct EDID data set is generated
in a single build step.

---

Christoph Niedermaier (2):
  Docs/EDID: Fixed erroneous bits of XOFFSET, XPULSE, YOFFSET and YPULSE
  Docs/EDID: Calculate CRC while building the code

 Documentation/EDID/1024x768.S  |  5 ++---
 Documentation/EDID/1280x1024.S |  5 ++---
 Documentation/EDID/1600x1200.S |  5 ++---
 Documentation/EDID/1680x1050.S |  5 ++---
 Documentation/EDID/1920x1080.S |  5 ++---
 Documentation/EDID/800x600.S   |  5 ++---
 Documentation/EDID/HOWTO.txt   | 13 ++-----------
 Documentation/EDID/Makefile    | 15 +++++++++++++--
 Documentation/EDID/edid.S      | 10 ++++++----
 9 files changed, 33 insertions(+), 35 deletions(-)

Comments

Jonathan Corbet Nov. 6, 2018, 2:35 p.m. UTC | #1
On Mon, 5 Nov 2018 09:48:33 +0100
Christoph Niedermaier <cniedermaier@dh-electronics.de> wrote:

> A problem was found when EDID data sets for displays other
> than the provided samples were generated. The patch series has
> no effect on the provided samples that still match the data
> used in drivers/gpu/drm/drm_edid_load.c.
> The provided samples use small values for XOFFSET, XPULSE,
> YOFFSET and YPULSE, where the error doesn't occur. This fix
> corrects the use of that values in case of high values, because
> the most significant bits were treated incorrectly.
> 
> The previous version made it necessary to first generate an
> EDID data set without correct CRC and then to fix the CRC in
> a second step. This patch series adds the CRC calculation to the
> makefile in such a way that a correct EDID data set is generated
> in a single build step.

This seems reasonable, I guess; I've applied both.  It seems to me, though,
that this stuff is in the wrong place.  Perhaps we should go one step
further and move it to tools/ ?

Thanks,

jon
Jani Nikula Nov. 13, 2018, 7:45 p.m. UTC | #2
On Tue, 06 Nov 2018, Jonathan Corbet <corbet@lwn.net> wrote:
> On Mon, 5 Nov 2018 09:48:33 +0100
> Christoph Niedermaier <cniedermaier@dh-electronics.de> wrote:
>
>> A problem was found when EDID data sets for displays other
>> than the provided samples were generated. The patch series has
>> no effect on the provided samples that still match the data
>> used in drivers/gpu/drm/drm_edid_load.c.
>> The provided samples use small values for XOFFSET, XPULSE,
>> YOFFSET and YPULSE, where the error doesn't occur. This fix
>> corrects the use of that values in case of high values, because
>> the most significant bits were treated incorrectly.
>> 
>> The previous version made it necessary to first generate an
>> EDID data set without correct CRC and then to fix the CRC in
>> a second step. This patch series adds the CRC calculation to the
>> makefile in such a way that a correct EDID data set is generated
>> in a single build step.
>
> This seems reasonable, I guess; I've applied both.  It seems to me, though,
> that this stuff is in the wrong place.  Perhaps we should go one step
> further and move it to tools/ ?

And then the next step further would be to write a tool in a high level
language to generate the data rather than assemble the binary. Such a
tool would, of course, catch errors like the ones fixed by this patch.

BR,
Jani.
Christoph Niedermaier Nov. 15, 2018, 8:37 a.m. UTC | #3
Hi Jon,

On Tue, Nov 6, 2018, Jonathan Corbet wrote:
> This seems reasonable, I guess; I've applied both.  It seems to me, though,
> that this stuff is in the wrong place.  Perhaps we should go one step
> further and move it to tools/ ?

I spoke to Carsten and his intention apparently was to merely document
how the somewhat cryptic data structures in drivers/gpu/drm/drm_edid_load.c
were derived. The code needed to be run only once to generate the data and
never again. So it not really is a tool that someone may want to run from time
to time for a particular purpose. So we would propose to leave the EDID directory
where it currently is. However, should you feel that it would better be placed
in the tools directory then you certainly may do that.

Best regards,
Christoph
Christoph Niedermaier Nov. 15, 2018, 9:02 a.m. UTC | #4
On Tue, 13 Nov 2018, Jani Nikula wrote:
> On Tue, 06 Nov 2018, Jonathan Corbet <corbet@lwn.net> wrote:
>> On Mon, 5 Nov 2018 09:48:33 +0100
>> Christoph Niedermaier <cniedermaier@dh-electronics.de> wrote:
>>
>>> A problem was found when EDID data sets for displays other than the 
>>> provided samples were generated. The patch series has no effect on 
>>> the provided samples that still match the data used in 
>>> drivers/gpu/drm/drm_edid_load.c.
>>> The provided samples use small values for XOFFSET, XPULSE, YOFFSET 
>>> and YPULSE, where the error doesn't occur. This fix corrects the use 
>>> of that values in case of high values, because the most significant 
>>> bits were treated incorrectly.
>>> 
>>> The previous version made it necessary to first generate an EDID data 
>>> set without correct CRC and then to fix the CRC in a second step. 
>>> This patch series adds the CRC calculation to the makefile in such a 
>>> way that a correct EDID data set is generated in a single build step.
>>
>> This seems reasonable, I guess; I've applied both.  It seems to me, 
>> though, that this stuff is in the wrong place.  Perhaps we should go 
>> one step further and move it to tools/ ?
>
> And then the next step further would be to write a tool in a high level language to generate the data rather than assemble the binary. Such a tool would, of course, catch errors like the ones fixed by this patch.

It would be nice, but for now it works.
Speaking for me such a task has low priority,
because in my opinion this code is not often used and
it is more intended for documentation purpose.

Best regards,
Christoph