How to add the screen resoution support in driver?

Adam Jackson ajax at nwnk.net
Fri Jul 30 07:36:38 PDT 2010


On Fri, 2010-07-30 at 10:25 +0800, Huang, FrankR wrote:

> 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.

If you add that modeline to xorg.conf, then it'll be presented to the
driver's mode_valid hook.  The only thing that hook should do is verify
whether it's something the hardware can actually do (for example, that
it doesn't take too much memory, or that it's not interlaced if your
hardware can't do that).

Mode sorting and preference is already handled by the core code.
User-specified modes have a higher priority than modes gathered from
EDID, and the preferred mode in EDID has a higher priority than the rest
of the modes in EDID.

>  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.

I don't understand the "we can use a adjacent timing" bit.  You should
be using the mode timings in the modeline itself.  Why do you think you
need to do something different?

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100730/8e3dcebd/attachment.pgp>


More information about the xorg-devel mailing list