From patchwork Thu Jul 19 15:54:25 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carsten Emde X-Patchwork-Id: 1218441 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 337E7DF25A for ; Thu, 19 Jul 2012 20:38:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1359EA0FDB for ; Thu, 19 Jul 2012 13:38:29 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from toro.web-alm.net (toro.web-alm.net [62.245.132.31]) by gabe.freedesktop.org (Postfix) with ESMTP id BC649A0FB1 for ; Thu, 19 Jul 2012 09:18:46 -0700 (PDT) Received: from toro.web-alm.net (localhost.localdomain [127.0.0.1]) by toro.web-alm.net (8.12.11.20060308/8.12.11/Web-Alm-2003112001) with ESMTP id q6JG18gt001975; Thu, 19 Jul 2012 18:01:08 +0200 Received: from rack3slot8.osadl.org (uucp@localhost) by toro.web-alm.net (8.12.11.20060308/8.12.10/Submit/Web-Alm-2003112001) with bsmtp id q6JG18DY001973; Thu, 19 Jul 2012 18:01:08 +0200 Received: from rack0slot7.osadl.org (rack0slot7.osadl.org [192.168.255.7]) by rack3slot8.osadl.org (8.13.8/8.13.8/CE-2010120801) with ESMTP id q6JFuXFw019673; Thu, 19 Jul 2012 17:56:33 +0200 Received: from rack0slot7.osadl.org (rack0slot7.osadl.org [127.0.0.1]) by rack0slot7.osadl.org (8.14.5/8.14.5) with ESMTP id q6JFuXbf027838; Thu, 19 Jul 2012 17:56:33 +0200 Received: (from root@localhost) by rack0slot7.osadl.org (8.14.5/8.14.5/Submit) id q6JFuXTs027837; Thu, 19 Jul 2012 17:56:33 +0200 Message-Id: <20120719155633.471740372@osadl.org> User-Agent: quilt/0.51-1 Date: Thu, 19 Jul 2012 17:54:25 +0200 From: Carsten Emde To: David Airlie Subject: [PATCH 1/1] Load EDID: Explain better how to write your own EDID firmware References: <20120719155424.862376797@osadl.org> Content-Disposition: inline; filename=edid-howto-explain-timing-vars-better.patch X-Virus-Scanned: ClamAV version 0.94.2, clamav-milter version 0.94.2 on rack3slot8.osadl.org X-Virus-Status: Clean X-Mailman-Approved-At: Thu, 19 Jul 2012 13:37:29 -0700 Cc: Carsten Emde , DRI X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org A description was lacking how to write an EDID firmware file that corresponds to a given X11 setting. Signed-off-by: Carsten Emde Reviewed-by: Adam Jackson --- Documentation/EDID/HOWTO.txt | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) Index: linux-3.4.4-rt13/Documentation/EDID/HOWTO.txt =================================================================== --- linux-3.4.4-rt13.orig/Documentation/EDID/HOWTO.txt +++ linux-3.4.4-rt13/Documentation/EDID/HOWTO.txt @@ -28,11 +28,30 @@ Makefile environment are given here. To create binary EDID and C source code files from the existing data material, simply type "make". -If you want to create your own EDID file, copy the file 1024x768.S and -replace the settings with your own data. The CRC value in the last line +If you want to create your own EDID file, copy the file 1024x768.S, +replace the settings with your own data and add a new target to the +Makefile. Please note that the EDID data structure expects the timing +values in a different way as compared to the standard X11 format. + +X11: +HTimings: hdisp hsyncstart hsyncend htotal +VTimings: vdisp vsyncstart vsyncend vtotal + +EDID: +#define XPIX hdisp +#define XBLANK htotal-hdisp +#define XOFFSET hsyncstart-hdisp +#define XPULSE hsyncend-hsyncstart + +#define YPIX vdisp +#define YBLANK vtotal-vdisp +#define YOFFSET (63+(vsyncstart-vdisp)) +#define YPULSE (63+(vsyncend-vsyncstart)) + +The CRC value in the last line #define CRC 0x55 -is a bit tricky. After a first version of the binary data set is -created, it must be be checked with the "edid-decode" utility which will +also is a bit tricky. After a first version of the binary data set is +created, it must be checked with the "edid-decode" utility which will most probably complain about a wrong CRC. Fortunately, the utility also displays the correct CRC which must then be inserted into the source file. After the make procedure is repeated, the EDID data set is ready