summaryrefslogtreecommitdiff
path: root/src/i830_modes.c
AgeCommit message (Collapse)Author
2007-01-15Convert I830PipeSetMode to xf86CrtcSetMode. Add rotation structures.Keith Packard
Makes the mode setting logic device independent. Magic rename hooks allow multiple drivers to provide the generic code without name conflicts. Rotation code requires special pixmap creation hook, and uses Render to perform the actual rotation.
2006-12-28Configuration support: per-output mode lines, preferred mode.Keith Packard
Add the modelines specified in the per-output monitor and all of the default modes to the list to each output. Prune the resulting list to specified sync limits and virtual sizes. Sort the resulting mode list on preferred/size/refresh.
2006-12-21If DDC detailed modes are missing physical size, pull from features.Keith Packard
Monitors without detailed modes, or those which do not bother to set a physical size in their detailed modes may still have physical size in the global data.
2006-12-06Use xf86 structures for default config instead of RandR.Keith Packard
To avoid requiring RandR 1.2 in the X server, use the xf86 Crtc and Output structures as the basis for the default configuration computation (and, eventually, the config-file based configuration as well).
2006-11-30Merge branch 'restructure-outputs' into modesetting.Keith Packard
Outputs and Crtcs now have a driver-independent representation which should permit generic code to control RandR 1.2 and startup configuration.
2006-11-30Oops. Don't try to use xf86RandR names, use xf86RandR12 instead.restructure-outputsKeith Packard
Attempts to override functions in core server fail, so use new names instead.
2006-11-30Rename I830 randr functions to xf86 as they are becoming generic.Keith Packard
Change function names, create separate i830_randr.h header file to contain definitions.
2006-11-28Conditionally compile old-server compatibility code in.Eric Anholt
This also replaces calls to compat code with the real names of the functions, and slips #defines to an i830-namespaced version in when doing compat. The current server version (7.1.99.2) is still left as requiring compat code, since the version hasn't been bumped yet. This also fixes some failures to call the compat code, and some failures to actually compile the compat code. Oops.
2006-11-28Remove printing of the XFree86 screen mode list, and some other detritus.Eric Anholt
2006-11-28Replace custom DDC mode list code with a copy of the X Server's.Eric Anholt
The X Server now has most of the mode helper functions we want, and we can start removing compilation of our copies when the server is new enough.
2006-11-27Move crtc/output config to sub-structure.Keith Packard
Place crtc/output in separate structure at head of driver private structure. Use this from the config code to make it driver-independent. Still lots of effectively driver independent code that continues to use driver dependent stuff, but that will change.
2006-11-26Start output/crtc restructuring work. It compiles.Keith Packard
Outputs and Crtcs are now split between 'generic' and 'driver specific' pieces in the hope that more code will be able to migrate to the xf86-generic layer. Right now, the code remains tangled together, significant work remains to tease the pieces apart. First the code needs to be made to actually work as-is though.
2006-11-16RandR-based initial output configuration.Keith Packard
Using pre-init computed RandR information, make reasonable default choices for the output configuration at startup time. Either some preferred size or a size which yields 96dpi is chosen, from which other monitors are set to a similar size. The largest size sets the screen size. This needs to be extended to respect config file settings, but those have not been defined yet.
2006-11-09Expose the DDC-probed EDID data as the EDID_DATA output property.Eric Anholt
2006-11-03Create I830PipeRec to hold pipe-specific data. Remove unused I830 members.Keith Packard
I830 contained six parallel arrays for pipe-specific data; these have been moved to a I830PipeRec structure instead. I830 also contained several unused members: unsigned int bios_version; Bool newPipeSwitch; Bool fakeSwitch; int fixedPipe; These have been removed, along with the code that set them.
2006-11-01Attempt to pull monitor physical size information out of DDC EDID data.Eric Anholt
2006-11-01Move mode lists from per-pipe to per-output.Eric Anholt
This should let RandR do the right thing in exposing the modes to userland. As a side effect of getting this working, the SDVO pixel clock range code was fixed and the mode valid tests for various outputs got extended. Also, LVDS grew a get_modes for the fixed panel mode. Note that we now no longer do automatic enabling of outputs at xrandr -s 0, hotkey, or VT switch. That will be left to generic RandR code later. Also, generic modes and user-defined modes are once again not validated into the lists, so this is a regression there.
2006-10-31Give each output a get_modes function and expose those modes through RandR.Eric Anholt
The get_modes should return the probed modes only. The driver should then append to the list (for example, compatible modes listed in other outputs, or standard VESA modes) to create the list to expose through RandR. That isn't done yet.
2006-10-31Move output connection detection to a per-output method.Eric Anholt
This will be used by RandR, and should let us clean up some of the initial display configuration, hopefully. Also, analog hotplug-based detection is now enabled on G965.
2006-10-30Remove some dead code from BIOS modesetting.Eric Anholt
2006-10-25Clean up SDVO code, moving the private structure internal and cleaning up caps.Eric Anholt
All the SDVO code should now be in lower case rather than StudlyCaps. This also adjusts the I2C setup to create a bus per SDVO output we set up. The previous setup with shared buses was failing in some circumstances, which is probably due to the lack of refcounting in xf86i2c.c.
2006-10-24Merge branch 'modesetting-origin' into modesettingKeith Packard
2006-10-23Merge branch 'overhaul' into modesettingEric Anholt
2006-10-09Move per-output mode setting code to per-output methods.Eric Anholt
This is not a very clean interface, as a number of outputs require tweaks to the DPLL registers. When possible, the DPLLs are just adjusted in the per-output post_set_mode, which happens just after the DPLL is enabled. However, this seems better than the previous method of having all outputs programmed in the same function.
2006-10-06Compute LVDS resolution from server DPI and native panel size.Keith Packard
I was unable to find the native LVDS panel physical size in the BDB information. I would prefer to report accurate information through RandR if possible though.
2006-10-05Remove checks for output privates in various bits of code.Eric Anholt
Now, the output is only set up if it fully initializes, so it will never exist if the private it requires doesn't.
2006-10-04Add mode origins for randrKeith Packard
2006-09-27Merge branch 'randr-1.2' into modesettingEric Anholt
2006-09-23Construct default monitor description for hotplug non-DDC monitor.Keith Packard
When detecting a monitor that doesn't support DDC, construct a default monitor with "sensible" values instead of using whatever the builtin LCD screen uses. Clearly we need a way to set the monitor parameters when we cannot detect them.
2006-09-22Remove some dead code related to clock ranges.Eric Anholt
2006-09-20Update driver for RandR 1.2 X server API.Keith Packard
This is not entirely what I'd like to see, but it's at least functional. Limitations: Can't disable/enable crtcs Can't move outputs on/off crtcs But, it does handle monitor hot-plug, detecting changes in VGA and SDVO status on-the fly. Which makes for good demo material.
2006-08-02Fix a braino in mode list pruning.Adam Jackson
Interpreting the size of the display in centimeters as the size in pixels, and then clipping the modes list based on that, rarely does what you want.
2006-07-14Don't try to probe on more pipes than we really have.Eric Anholt
2006-07-13In I830xf86SortModes, catch cases where two modes are equal in only oneAdam Jackson
dimension, by comparing the areas of the modes. Otherwise, 800x600 would sort before 1024x600 if it was added later.
2006-07-13Fix a thinko; would only inject the FP native mode if a mode list was alreadyAdam Jackson
found, which is never the case when there's no xorg.conf.
2006-07-11Bug #7443: Respect the user's Modes configuration, and make it more useful.Eric Anholt
Now, mode names generated by DDC get names of the form "WIDTHxHEIGHTxREFRESH". The matching for user Modes lines takes the user Modes as the prefix that needs to match, rather than an exact string match or "WIDTHxHEIGHT" match. So one can, for example, specify "1024x768" to get any old 1024x768, or 1024x768x60 to get one of the modes named 1024x768x60.
2006-07-11Fix crash with DDC when there are no user modes to add.Eric Anholt
2006-07-10Make DVO code light up my sil164-based DVI output, when already set up by BIOS.Eric Anholt
2006-07-10Fix modelist with a configured monitor to not begin with all unvalidated modes.Eric Anholt
2006-07-05Don't try to probe modes on an SDVO device with NULL sdvo_drv.Eric Anholt
2006-06-28Replace i830InjectModes with i830DuplicateModes usage.Eric Anholt
The remaining functionality of DuplicateModes was OBE, and the name was bad.
2006-06-28Validate and insert user and VESA standard modes for DDC or configured fallback.Eric Anholt
This isn't really tested because I lack a good CRT to test against currently.
2006-06-28Replace xf86ValidateModes usage with a set of custom validators and pruning.Eric Anholt
This moves us to maintaining MonPtrs per pipe instead of using the EDID structure "xf86MonPtr", which is closer to what we want to be looking at when doing validation. The new validation isn't enough yet -- particularly, we aren't importing and validating the custom modelines to the pipes when applicable, but this will be easier than (for example) trying to make flat panel modes pass xf86ValidateModes through various gross hacks. Hotplug turn-on/off also happens at SwitchMode time now, instead of at randr probe time.
2006-06-27Fix randr current mode reporting and mode loss/mis-configuration on re-randr.Eric Anholt
2006-06-26Clean up warnings.Eric Anholt
2006-06-26Fix the plane/pipe disabling and turn off missing outputs when no longer DDCed.Eric Anholt
2006-06-26Fix DDC probing after last (untested) commit.Eric Anholt
2006-06-26Major cleanup of mode reprobing:Eric Anholt
- Don't mess with pScrn->monitor->Modes, and instead make our own availModes. - Don't re-program the pipe with the same values (no flicker at xrandr) - Move a bunch of stuff that should be exposed through the public API (probably) to i830_xf86Modes.c - Use a table with established modes plus GTF to come up with modes from EDID, instead of trying to walk and find one in pScrn->monitor->Modes. I think this is correct. - Reset clone state if we've detected new pipes, which should turn on the cursor.
2006-06-23WIP to allow re-probing and validation of modes for new heads at "xrandr" time.Eric Anholt
Now, DDC modes always end up being preferred to custom modelines, even if smaller. This should probably be fixed by inserting custom modelines into the probed mode list if they're valid according to the probed parameters of the monitor. Too much code is lifted from static functions in xf86Mode.c, and those should be made unstatic if possible. Using xf86ValidateModes is also rather hacky, and I want to break the function down, but this is a first step.
2006-06-23Split probed modes out per pipe, and union them into the available modes.Eric Anholt
This is the first stage of getting runtime monitor attachment. The old i830 GTF code is returned to use to provide suitable modelines for xf86ValidateModes in the LVDS case, even though the LVDS doesn't care about the modeline and just always programs its fixed values.