summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
AgeCommit message (Collapse)Author
2010-06-25Rename common infrastructure to the intel namespace.Chris Wilson
After splitting out the i810 driver into its own legacy directory, we can identify the common routines not as i830 but as intel. This clarifies the code which *is* i830 specific. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-06-15drmmode: Use the tiled stride for the rotated pixmap.Chris Wilson
After d41684d5459 we now allocate all framebuffers as tiled bo, and so we must be careful to use the appropriate stride as returned from the allocation, instead of assuming that it is just an aligned width. Fixes: Bug 28461 - screen rotation results in corrupted output. https://bugs.freedesktop.org/show_bug.cgi?id=28461 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reported-by: Till Matthiesen <entropy@everymail.net>
2010-06-07Allocate rotate shadow buffers using the usual framebuffer allocator.Eric Anholt
This means we can get tiling on them, which should significantly boost performance, and also allow for FBC.
2010-06-07Allocate a correctly sized framebuffer when tiling by using libdrm's support.Eric Anholt
When I made libdrm stop overallocating so much memory for the purpose of bo caching, things started scribbling on the bottom of my frontbuffer (and vice versa, leading to GPU hangs). We had the usual mistake of size = tiled_pitch * height instead of size = tiled_pitch * tile_aligned_height.
2010-06-06Use libc instead of deprecated libc wrappers for malloc/calloc/free.Eric Anholt
2010-05-14drm: Remove pin(); unpin() syncChris Wilson
GEM handles serialisation of the new front buffer with respect to page flipping and rendering and reports back when the flip is complete. Adding a sync point here is then redundant. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: Remove unused old_front parameter from drmmode_do_pageflip.Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-14drm: don't overwrite the old intel->front_bufferChris Wilson
It's now handled in the common ExchangeBuffers() path. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-11drmmode: Reorder i830_set_pixmap_bo() so that the correct stride is used.Chris Wilson
The pitch needs to be set on the pixmap prior to the private intel_pixmap structure being created so that it can record the correct value from the pixmap. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-05-10i830: Minor cleanupChris Wilson
Remove some extraneous prototypes and unused variables. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-04-10Review i830_pad_drawable_width()Chris Wilson
We appear to have a confusion of stride in terms of pixels, pitch in terms of bytes and the actual width of the surface. i830_pad_drawable_width() appears to be operating aligning *pixels* to a 64 pixel boundary and has never used the chars-per-pixel causing considerable confusion in its callers. Remove the parameter and ensure that the callers are expecting a value in pixels returned, multiplying by cpp where necessary to get the pitch. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-22Clear drmmode_output->mode_output in drmmode_output_destroy().Matthias Hopf
2010-03-22Initialize flip_count before using itLi Peng
Otherwise it would be a random value and drmmode_page_flip_handler() won't have a chance to call I830DRI2FlipEventHandler() and indicate a full page flip is complete. Signed-off-by: Li Peng <peng.li@intel.com>
2010-03-08Put back the pitch alignment for new framebuffers.Eric Anholt
I confused a dead assignment with dead code, because one of the args to the function was an outvalue. Fixes corruption under compiz. Bug #26814.
2010-03-06Fix build against xserver 1.6 branch.Robert Hooker
Signed-off-by: Robert Hooker <sarvatt@ubuntu.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2010-03-04Remove remaining fbOffset setting.Eric Anholt
In the long long ago, fbOffset was used for DGA. The server now has only one reference to fbOffset, a leftover setting of it in fbdevhw. We can safely ignore it now, which is good since we weren't updating it in other places where the front buffer offset could change.
2010-03-04Init CRTC cursors with CRTC setup instead of i830_memory.Eric Anholt
2010-03-04i830_memory: switch frontbuffer to drm_intel_boDaniel Vetter
Yet another user of i830_memory gone for good. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-03-04i830_memory: rip out field "offset"Daniel Vetter
Use the one in the drm bo instead. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net>
2010-02-26Remove dead code: fill_detailed_lvds_blockCarl Worth
All callers of this function were recently removed, so it can join them in the bit bucket.
2010-02-26kms: Fix LVDS mode list construction.Adam Jackson
Rather than mangle the EDID block and hope the server does the right thing, just build a sensible mode list up front. Do this for LVDS where there is no EDID or where it does not claim to be continuous-frequency (since in the latter case, the server will add reasonable modes for us). Signed-off-by: Adam Jackson <ajax@redhat.com>
2010-02-20Remove dead assignments noticed by clang.Eric Anholt
2010-02-10Disable bo reuse on shadow framebufferJesse Barnes
This keeps us from trying to set tiling on it while pinned, which also keeps us from trying to unpin it in the kernel, causing an error. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-13DRI2: support new DRI2 APIsJesse Barnes
The new interfaces allow for improved buffer swap, and support for the SGI_swap_control, SGI_video_sync and OML_sync_control GLX extensions. The Intel implementation allows page flipping to occur for swaps that are full screen and not rotated. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2010-01-08Consolidate determining maximum sizes for use with GEMChris Wilson
Add a small wrapper function so that the callsites need only call the single function when checking the available aperture size for determining the maximum viable size for operations. This will allow us to easily extend this set in the future by only needing to adding the check to a single location. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-11-30uxa: Limit maximum size of tiled objectsChris Wilson
On older chipsets (i.e. pre-i965) tiling is very restrictive and imposes severe size and alignment constraints. Combine that with relatively small apertures and it is very easy to create a batch buffer that cannot be mapped into the aperture (but would otherwise fit based purely on total object size). To prevent this we need to not use tiling for large buffers (the very same buffers where tiling would be of most benefit!). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2009-10-13Return failure when the enum-type output property values are not foundZhao Yakui
Failure to do so causes xrandr to report incorrect property values. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Eric Anholt <eric@anholt.net>
2009-10-13Drop frontbuffer from crtc in I830CloseScreenAlbert Damen
By dropping the frontbuffer from the crtc, the new frontbuffer can be properly added to the crtc when the xserver is reset. Signed-off-by: Albert Damen <albrt@gmx.net>
2009-10-13drmmode: with 1.7 server, set mode major doesn't get gamma setup.Dave Airlie
Noticed this on Fedora, where 1.7 server does gamma via the randr codepaths however kms doesn't have this call which happens in the non set_mode_major path. probably should be backported to released drivers. Signed-off-by: Dave Airlie <airlied@redhat.com>
2009-10-08Rename the xf86 screen private from pScrn to scrn.Eric Anholt
2009-10-08Rename the screen private from I830Ptr pI830 to intel_screen_private *intel.Eric Anholt
This is the beginning of the campaign to remove some of the absurd use of Hungarian in the driver. Not that I don't like Hungarian, but I don't need to know that pI830 is a pPointer.
2009-10-05Implement drmmode overlayDaniel Vetter
This does not restore the overlay on EnterVT/disable it on LeaveVT. Does not look like this is necessary. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> [anholt: Hacked in avoiding the actual kernel calls with Signed-off-by: Eric Anholt <eric@anholt.net>
2009-09-22Add new backlight driver "samsung".Matthias Hopf
2009-09-17Make sure DRM output properties are freed after we're done with them.Keith Packard
drmmode_output_get_modes was fetching output properties but only freeing some of them. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-09-03Don't set backlight level if going on->on.Matthias Hopf
Otherwise changed backlight will be reset upon DPMS switch off, because first this function is called with DPMSModeOn.
2009-09-03Use "Backlight" as backlight brightness property.Matthias Hopf
BACKLIGHT is now deprecated, though still usable.
2009-09-03Add get_property support.Matthias Hopf
So far only BACKLIGHT is changed.
2009-09-03Don't ignore backlight level change to the same level.Matthias Hopf
If set externally to a different level, this would result in a no-op. OTOH if the display is switched off (DPMS) you do not want the change to take place immediately, but rather to be saved and set later when the display is active again.
2009-08-25KMS: allocate one bo per crtc for cursorKeith Packard
The KMS API doesn't provide for sharing a single bo for multiple cursor images, so allocate one bo for each crtc to hold the cursor image. KMS also only supports ARGB cursors, so don't bother to allocate buffers for two color cursors. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-25Reload cursors as needed when setting new modes.Keith Packard
Cursor images may need rotation, or positions updated when new modes are set. The server provides a convenience function, xf86_reload_cursors for precisely this purpose. Just call it after the new mode is set. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-08-20kms: Don't use fb offset when using shadow bufferKristian Høgsberg
2009-08-18Add BACKLIGHT property support in KMS case.Matthias Hopf
2009-07-26Allow DRM mode setting to include transformationsKeith Packard
This removes the explicit transform disabling code in drm_set_mode_major. Without a fixed X server, transforms will still be broken, but even a fixed X server can't work around this driver bug. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-21drmmode_output_get_modes: Replace existing EDID property blob with new oneKeith Packard
This synchronizes the X EDID data with the kernel EDID data each time the kernel data may have changed. Otherwise, X ends up stuck with the first EDID data it sees, failing to accomodate to different monitors. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-10KMS: Keep screen pixmap devPrivate.ptr NULL during init and resizeKeith Packard
The frame buffer only has a valid address between prepare_access and finish_access calls, so remove all other attempts to compute an address from the driver. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-10Remove NoAccel supportKeith Packard
This removes yet another 'debugging' option that hasn't seen real use in a long time, and wasn't supported under KMS in any case. Signed-off-by: Keith Packard <keithp@keithp.com>
2009-07-02Clear the bo on the rotate scratch pixmapJesse Barnes
Since the scratch pixmap header will be re-used after allocation, we need to clear its bo attachment when we stop using it, otherwise a later user will use a bogus bo. Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-30Make KMS set_resource function return TRUEJesse Barnes
This is what's expected by the server, and allows the EDID for example to be exported in the KMS case. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2009-06-29Output error info if we fail to get DRM resourcesJesse Barnes
Useful for debugging.
2009-06-24Treat disabled CRTCs as "not covering" for scanline wait purposesJesse Barnes
Now that swapbuffers does a scanline wait to avoid tearing, it's important to take into account the CRTC status to avoid hangs. If we do a scanline wait when the CRTC is off (due to DPMS for example) we'll hang the GPU. So add some code to check the CRTC DPMS status to the i830_covering_crtc function, returning NULL if none of the covering CRTCs are actually active. KMS vs UMS logic is hidden in new i830* functions, cleaning up both DRI2 & video paths a bit. Fixes fdo bug #22383. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>