How to add the screen resoution support in driver?

Huang, FrankR FrankR.Huang at amd.com
Thu Jul 29 19:25:13 PDT 2010


Ajax,
	Very professional explanation to the question which I want.
	After looking at the Xorg.0.log and using xrandr to get the resolutions our driver supports, I know that EDID info is the primary source for the gnome-display-properfites applet. And after a look at the Xserver code, I found that the modes supported include three parts: config_modes, output_modes and default_modes. Output_modes are from EDID info while config_modes are from the xorg.conf Modelines or "xrandr --addmode".
	Take an example, we want to support 1024x600, I can add a Modeline to xorg.conf. But there is a call to driver named "output->funcs->mode_valid" to validate if that resolution should be supported. I found this function(lx_output_mode_valid) in our driver. Because we only want to return MODE_OK to this resolution. Which is our best method for this?  Checking variable DisplayModePtr->type seems unworkable. I paste the link for lx_output_mode_valid function:
	http://cgit.freedesktop.org/xorg/driver/xf86-video-geode/tree/src/lx_output.c?id=e9447f5335681a78cf87ebf8c9659a6fecfc9746
	If you are familiar with this part, you can give me a suggestion. From what I have known, the display timings, we can use a adjacent timing. It is not a issue for us. And I compulsively return MODE_OK, our HW can support 1024x600 already. The only thing is we should return "MODE_OK" I think.


Thanks,
Frank
 

> -----Original Message-----
> From: Adam Jackson [mailto:ajax at nwnk.net]
> Sent: 2010年7月30日 1:31
> To: Huang, FrankR
> Cc: xorg-devel at lists.x.org
> Subject: Re: How to add the screen resoution support in driver?
> 
> On Wed, 2010-07-28 at 09:09 +0800, Huang, FrankR wrote:
> > Have a question to ask:
> > We want to support some wide-screen resolutions in our platform under
> > linux. And we hope that can be recognized in the applet
> > Preferences->Display->Resolution.
> > Can you tell me what the mechanism in that? That is to say, how the
> > application under desktop can recognize the resolutions we add?
> 
> For pre-RANDR-1.2 style drivers, the mode list is constructed at server
> initialization based on the EDID of the attached monitor.  For modern
> drivers, the list is built afresh every time the output is queried
> (again, from the EDID of whatever happens to be attached).
> 
> In either case, gnome-display-properties just looks at the list of modes
> the server provides in the RANDR extension.
> 
> If your driver can program arbitrary display timings (and it can), then
> this is all pretty much automatic.  The only thing you need to
> explicitly add support for is if you have some platform method of
> getting resolutions from an output that isn't EDID; some Intel chips
> have a bare detailed timing somewhere in the video BIOS but no EDID, for
> example.
> 
> - ajax


More information about the xorg-devel mailing list