summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-07Removed 24 bit visual - we use 32 bit visuals for RGB888.Dave Barnish4-28/+43
Change-Id: Ie9464b9dd9bbe4c1f13bbb2e6a327f2424d4b937
2014-03-25Fallback to 24 bit depth if 32 bit depth is not supported.Dave Barnish1-3/+22
If the DRM does not support 32 bit depth at 32 bpp we fallback to 24 bit depth at 32 bpp. The display controller will effectively ignore the alpha channel. Change-Id: Ia142aa50a1d22f6ff3d99e3b45f87273d9f6f953
2014-03-14Version change to 0.7.00.7.0Paul Geary1-1/+1
Change-Id: Ib7e9c3632f6a2766a810a93eef8bb6ee3a0e9f5a
2014-02-14Added HWCURSOR_API_NONE to the platform specific hwcursor api.Dave Barnish2-11/+23
New option allows a software-only cursor to be specified Change-Id: Ice4bd122ab6b24146d50dcd497a9a70831fc1274
2014-02-12Report damage for drawable in ARMSOCDRI2ScheduleSwapDave Barnish1-0/+9
Based on chromeos xf86-video-armsoc commit https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc/+/81e3f9f Change-Id: Idd7b9df652e26167a14ffff3ddf3156b726bbc88
2014-01-31Fix malloc/calloc/free usageDaniel Kurtz6-26/+25
. Use calloc when allocating objects. . Use malloc when allocating a buffer that we are about to completely fill. . In both cases, NULL check the result, unless using X built-in "kill server on alloc fail" versions (e.g., xnfcalloc()) . The canonical way to call calloc is: ptr = calloc(nelem, sizeof *ptr); /* or sizeof(*ptr) */ if (ptr) { /* Handle OOM */ } . Don't NULL check before calling free(). BUG=none TEST=compiles clean; sanity check ui on device (cherry picked from commit 79795728e366a56013aa4affa2d42128441a5eb9) From: https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc Change-Id: I18b6a6c7c173c0120ec6da948b1e55cbe96e1e1d
2014-01-31Fix leak in OMAPProbe if xf86AllocateScreen() failsDaniel Kurtz1-2/+6
Fixes the leak of devSections and fd. Note: The previous version of OMAPProbe returned FALSE if *any* xf86AllocateScreen() fails. This version returns TRUE if at least one instance is successfully claimed. It should be ok to only allocate and claim some of the screens that were specified by xorg.conf "Device" sections. TODO: Opening fd with OMAPOpenDRM() and closing it with drmClose() is a mismatch. Better would be to: * open with one of drmOpen*() * open with open() and close with close() * introduce a new OMAPCloseDRM() But, any of these would require a separate patch. BUG=none TEST=builds clean; sanity check ui (cherry picked from commit e4f165c9551f883f2dddec7165e557662786f526) From: https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc Change-Id: I2d41d79eb4e7573f146b585afc9ba7a86508a4b5
2014-01-29Only modify pending_flips for flipsMathias Palmqvist1-2/+3
The following commit is copied from chromeos xf86-video-armsoc https://chromium.googlesource.com/chromiumos/third_party/xf86-video-armsoc/+/c04f8b8%5E%21/ Change-Id: Iaa29210066c835ce30826a6ca34073aca72e0825
2014-01-02Fix unsafe pointer-to-int castingRay Smith3-11/+12
Change-Id: I1d183f7ac1148828132be4a2a22bbfbc29fe937e
2013-11-29Chipset is now reported as 'Mali'.Dave Barnish1-24/+5
Change-Id: I4f99e7c2b3e6fe95d821f0932bf4cbc3fb71bb2e
2013-11-21Fix leaks in ARMSOCCloseScreenDave Barnish1-2/+13
Call the hardware cursor cleanup on close screen. Destroy the root pixmap in close screen (based on a change in https://chromium-review.googlesource.com/#/c/167860/1) Change-Id: I20987c9772bc5a3d9f44e976e57160ae428ec728
2013-11-14For Exynos, always request non-contiguous buffers.Dave Barnish2-12/+21
Contiguous buffers are not supported in some drm versions. Where they are, all buffers are contiguous anyway. Also stopped using the exynos_drm.h kernel header Change-Id: Id6920c0315e5c4b8c8fd1e3ce97d670fe283c5d5
2013-11-05Use EXYNOS_GEM_CREATE when allocating buffersDave Barnish1-27/+26
DRM_IOCTL_MODE_CREATE_DUMB doesn't always support the flags argument - EXYNOS_GEM_CREATE does. Change-Id: I20d01eca155801919b29e223fa70fcfec98b5144
2013-10-31Use flag settings for a non-scanout buffer in all cases for exynos drm.Dave Barnish1-1/+7
Using the correct settings for the dumb buffer create flags causes problems for chromebook so we use the non-scanout setting in both cases. This is okay for mainline drm which effectively always creates scanout buffers anyway. Change-Id: Icaee2a519b83c089c6aa939569d75796af230849
2013-10-10Change custom GEM creation flags for pl111.Javier Martin1-4/+19
GEM flags in the pl111 DRM driver have been changed so that we can specify the backing storage (SHM/DMA) and the kind of user space mapping (non cached, cached, writecombine). Support for cached mappings for SHM objects is not stable yet, so keep on using non cached mappings for now. Change-Id: I0085d01a37f142d8ad196ecb0d1624ff4f15a1ef
2013-10-03In drmmode_output_init() check possible_crtcs for all encodersDave Barnish1-64/+137
drmmode_output_init() now determines the connector's possible_crtcs as the set of crtcs which are possible for all encoders on that connector. (Previously only encoder 0 was used) Also calculates possible output clones using all encoders. Includes some renaming for clarity. Change-Id: I9cc1777d5160ce35bceaa7121bf9a70bb8d5a37c
2013-09-26Ensure the change of window flippablity before the first ScheduleSwap is ↵Liyou Zhou1-5/+3
always caught The flippability of a window could changes between ARMSOCDRI2CreateBuffer and the first call of ARMSOCDRI2ScheduleSwap. This change is not picked up by ScheduleSwap and hence the buffer of the window is not forced to update. This change fixes that behavior. This fixes situations where: - Window gets mapped - Window resize nonfs->fs (or vice versa) - Window gets unredirected - Fullscreen window gets unobscured between eglCreateWindowSurface and eglSwapBuffers. Change-Id: Ica82814638d6fbd91f5db984692d5c52ac3f910e
2013-09-25Removed unnecessary call to drmModeGetCrtc() in drmmode_crtc_init()Dave Barnish1-14/+13
Change-Id: I80a42444d2198e323590580d5159c8c25ba4c1b3
2013-09-16Remove ARGB to LBBP format conversion for pl111.Javier Martin5-150/+42
The pl111 DRM driver now exposes ARGB to user space for the HW cursor. This is according to what other DRM drivers are doing for HW cursor support. As a result we no longer need a custom callback for setting the cursor image. Change-Id: I9af6268f39cd7b1e22240326b09bed54af4fe5ae
2013-09-13On drmModeSetCrtc() fail, revert to last good settingsDave Barnish2-66/+91
Change-Id: I9e475efc4491c998ce95fbf74306463e3fb01349
2013-09-12Add support for standard HW cursor API.Javier Martin5-36/+163
Some drivers like the exynos support HW cursor using planes whereas others such as the pl111 DRM or the radeon driver use the standard ioctl() call for handling the cursor. This adds a new field for every drmmode driver where they must declare which API they support. Change-Id: I8027982c33f77c45789e0b822710f4d80be23762
2013-09-11Add InitFromFBDev xorg.conf optionDavid Garbett2-0/+170
Adds a new option that can be specified in xorg.conf - InitFromFBDev. With this set to a valid fbdev device file the contents of the DRM scanout buffer will be initialized by bliting from the fbdev device. This only makes sense when the Xorg -background none parameter is set on startup, otherwise the background would be overwritten. The primary use for this feature is to enable a smooth transition from fbdev to X. This commit is based on a set of commits to the armsoc fork at: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc Commits: a815781, 72af3eb, 0d7e384, 8be5d4f, 2ada542, 2e46d97, 2e46d97 NB: This implementation uses pixman to do the blit Change-Id: I227c120954a2a3f768d67bc04c00cbcd30917b64
2013-09-11Add dependency on pixmanDavid Garbett1-1/+8
The driver now directly calls pixman, so add it as a pkgconfig dependency. Change-Id: I0249709b023afaaa093c3a3f27c159c2f4b7b64b
2013-09-03Separate modeset fallbacks are retained for each crtcDave Barnish3-49/+53
Change-Id: I51d6e27f3bf961dae72d580220e895c3b49ce326
2013-09-02Fix build failure when XF86_SCRN_INTERFACE definedDave Barnish1-1/+1
fixes a problem introduced with commit 22437e9 Change-Id: Ie0150f9e7f7d0507864f2db9e08a23c3200fe9eb
2013-08-30Use xf86ScreenToScrn and xf86ScrnToScreenDaniel Kurtz6-22/+24
Part of the new compat-api.h are ScreenPtr <-> ScrnInfoPtr APIs. Let's use them. Cherry-picked from: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc ec81d1ef9d774af1189a05e5ce5a091d729d994a Change-Id: I347f5973eae02066b9a6fc27e07599e519b95abf
2013-08-30Call DRI2CloseScreen after pScreen->CloseScreenDaniel Kurtz1-5/+8
Both DRI2 and RandR may wrap pScrn functions. Thus, it is important that they get closed in the opposite order that they were initialized. OMAPScreenInit() calls DRI2ScreenInit() before xf86CrtcScreenInit() (which in turn calls xf86RandR12Init12). Therefore, OMAPScreenCloseScreen() must unwrap xf86CrtcCloseScreen() and call it (which in turn calls xf86RandR12CloseScreen) before calling DRI2CloseScreen. This should ensure that wrapped function order is correct between DRI2 and RandR12. In particular, this fixes the EnterVT handler such that it is correct on subsequent server generations. Cherry-Picked from: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc c5f79d00aa22fe7d0d2a7453f266a0f17539ebdd Change-Id: I5665c3452a18bf2009640453f62dda0f33eb215f
2013-08-30Explicitly set .resize member of xf86CrtcConfigFuncsRecDaniel Kurtz1-1/+1
resize is currently the only member of xf86CrtcConfigFuncsRec, but specify it explicitly to be more clear, and also more consistent with other struct initializations. Cherry-Picked from: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc eab4e1f89996a6b6490ffbfb22a9cf8db82b2bda Change-Id: I5e7abf0e36290caf141705c93ff2400d4e0044ef
2013-08-30Check result from fstatDavid Garbett1-6/+7
From xf86-video-intel commit: 2dc93b2a6c832ce8b972de90d09080e860dcd40f Based on commit from: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc badfada06d7998c9134aeaa48eba41c1b1b55427 by djkurtz@chromium.org Change-Id: Id03c424707172a92a1c8eb9bc8246c61443e5761
2013-08-30NameForAtom may return NULLDaniel Kurtz1-0/+2
Copied from xf86-video-intel commit 46fbb3d31bf73df4bd0259a146e9929f62a9c488 Cherry-Picked from: https://chromium.googlesource.com/chromiumos%2Fthird_party%2Fxf86-video-armsoc b74868ec9b10e7bf81703a0c44558159c06aa4c8 Change-Id: I4eddce9449b782315f7a3323793875f143d77e4e
2013-08-29Merge tag '0.6.0'Paul Geary1-1/+1
2013-08-28Bump version to 0.60.6.0David Garbett1-1/+1
Change-Id: Idfe4a6c5d74c9cfc9bec4d34e6d7814d9cb89867
2013-08-23A modeset that results in an unexpected resolution is revertedDave Barnish1-21/+96
When an unsupported resolution is requested the drm may fallback to the nearest available resolution without reporting an error. In this case armsoc will attempt to revert to the last known good settings and report an error, preventing mismatched crtc/fb sizes. Change-Id: I922601288b790980f3816101d62a6a6f5ebfa38e
2013-08-22Provide a new hook to allocate GEM objects in a device specific way.Javier Martin7-53/+152
DUMB_CREATE ioctl() should not be used to create buffers for rendering. Instead of that each device is responsible to provide that kind of facility in a specific way. This implements GEM object creation for both exynos and pl111. Change-Id: Idf9961e112f5f36b2fd0a66cab5d3a928fab096f
2013-08-20Use correct flags for scanout buffers in exynos.Javier Martin1-1/+1
This new value for the dumb scanout buffer makes sure that the allocated memory area will be physically contiguous. Change-Id: If54c817850148fc726371000b35af0f3415b1f0b
2013-08-15Use plane property for setting Exynos zposRay Smith1-4/+37
On older kernel versions there was an Exynos-specific ioctl to set the plane Z position. More recent kernels have replaced this with a property on the plane objects. This patch attempts to use the property first, and falls back to the old method if that fails. Change-Id: I9b22c1b0eb128cee2f0e7c5907012a49592787e1
2013-08-12Added a platform specific flag for vsync timestamp query support.Dave Barnish6-25/+35
If the target platform's DRM driver supports the vsync timestamp query the vblank_query_supported flag should be set to 1. drmWaitVBlank() will then be used in ARMSOCDRI2GetMSC(), otherwise this function always returns FALSE. Change-Id: I0d9610c58d6b246d19a1308f950ecfa0d5b12b54
2013-07-23Fallback to blitting when out of scanout memoryRay Smith4-14/+60
If DRM can't allocate a scanout buffer for a flippable window's back buffer, we now attempt to allocate a non-scanout buffer and blit the window rather than fail the DRI2 buffer allocation completely. Note that this fallback is only suitable for back buffers - if reallocating the front buffer (on res change etc.) failed, we can't fall back to a non-scanout buffer. Change-Id: I9614dde01e80fd3dc03a37afee1a38d00dd55348
2013-07-09DRI2 N-BufferingDavid Garbett3-29/+210
Adds an xorg.conf option to specify the number of buffers to use with DRI2. This will only apply when page flipping (i.e. full screen windows). Change-Id: I2e59a5fa521837bb24462d445897699486ba3874 Signed-off-by: David Garbett <david.garbett@arm.com>
2013-07-09Cache GEM name in omap_boDavid Garbett1-9/+22
A name remains valid while a GEM object has a handle. As such we avoid the IOCTL if we already have the name for an omap_bo. This simplifies the n-buffering implementation in DRI2, as we do not also need to track the names of the additional buffers. Change-Id: Ifa204e9f72239ce2777f6b48d824a77e8879a514 Signed-off-by: David Garbett <David.Garbett@arm.com>
2013-07-09Remove spurious semi-colonDavid Garbett1-1/+1
Change-Id: Ib52a7867f916d50f7c1482264510c6c16adb4cc1 Signed-off-by: David Garbett <David.Garbett@arm.com>
2013-07-03Remove ARMSOCRec.has_resizedRay Smith3-18/+29
This flag was broken in that it could get "consumed" by a redirected window being swapped before the composite overlay/root window (which is the intended recipient). Replaced by: - Bumping the serial number in drmmode_xf86crtc_resize to invalidate any back buffers on resolution change - Decide whether to flip based on front and back framebuffer sizes matching, rather than the has_resized flag Change-Id: I24e07db75d09a5412c12b9e75089e366a016ba2d
2013-06-27Move wakeup handler to per-fd not per-ScreenRay Smith3-14/+21
Previously we had one wakeup handler per Screen, and if multiple Screens shared the same DRM fd we would call the wakeup handler multiple times for the same DRM page flip event. The second drmHandleEvent call would hang because the event had already been consumed by the preceeding drmHandleEvent call. With this change we have one wakeup handler per fd, so there is no possibility of them conflicting. This fixes page flipping in the Screen-per-CRTC mode. Change-Id: Ib88ac94daa5325f31b2bff4b1a2867f1efbf2d45
2013-06-26Fix dropped const compiler warningsRay Smith1-4/+6
Change-Id: I2ece42fc8f69fcdd1a4c582b948f40495c133ca5
2013-06-26Fix build failure when XF86_SCRN_INTERFACE is definedDave Barnish1-11/+14
includes a few minor tidy ups. Change-Id: Ic233705525a9866c236b005fc0e51ea7846915b6
2013-06-24Added DRM device selection options to xorg.confDave Barnish3-15/+239
The DriverName and BusID options added to xorg.conf allow the user to select a specific DRM device. If neither of these are specified then /dev/dri/card'x' is opened where 'x' defaults to 0. The DRICard option allows the user to set a value for 'x' Change-Id: I2f22202e0bfea0fb2d532051afc67e9461db1ba4
2013-06-11Source conforms to linux kernel coding styleDave Barnish14-687/+799
Change-Id: I8d155efa4b9e1997e07c11bd453208f79b6a7f25
2013-06-10Fixed some small defectsDave Barnish6-25/+15
Change-Id: Id9164ab16c23ae406714d0f59ef35c75606d6700
2013-06-10Removed some unneeded #includesDave Barnish3-61/+6
Change-Id: Id51fcceebd81e7a489b49379a129f238964c09d5
2013-06-10Abstract cursor format handlingDave Barnish12-251/+235
Moved hardware cursor format handling to driver specific abstraction Moved cursor size definitions to driver specific abstraction Renamed abstraction interface to drmmode_interface for clarity Added cursor padding to workaround Exynos cursor corruption bug Removed obsolete TODO comment Change-Id: I6bcce670586dd4204e977a6f94402c0066f103f1