OSDN Git Service
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Allen Martin [Sun, 22 Feb 2015 13:18:56 +0000 (05:18 -0800)]
drm_hwcomposer: initialize timeline_next
Initialize timeline_next to 0
Change-Id: I5d9f051ac659b06be19f5e5eaaab8a665f10832c
Reviewed-on: https://chrome-internal-review.googlesource.com/200646
Reviewed-by: Sean Paul <seanpaul@google.com>
Commit-Queue: Sean Paul <seanpaul@google.com>
Tested-by: Sean Paul <seanpaul@google.com>
Allen Martin [Sun, 22 Feb 2015 12:48:14 +0000 (04:48 -0800)]
drm_hwcomposer: move AddFb/RmFb to reference gem handles
Move drmModeAddFB2 and drmModeRmFB to ensure a reference to the gem
handles are taken while the buffer is in use.
Change-Id: Ib9afdb91144850480ecaac9d73601d887af5fa12
Reviewed-on: https://chrome-internal-review.googlesource.com/200686
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Tested-by: Stéphane Marchesin <marcheu@google.com>
Allen Martin [Sun, 22 Feb 2015 12:18:17 +0000 (04:18 -0800)]
drm_hwcomposer: Check against gem handles for popped buffer
Add check before closing gem handle for most recently popped buffer in
addition to buffers in queue.
Change-Id: Icb096bd4db439b1195a123e28468142829fc61ea
Reviewed-on: https://chrome-internal-review.googlesource.com/200725
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Tested-by: Stéphane Marchesin <marcheu@google.com>
Allen Martin [Sun, 22 Feb 2015 05:20:17 +0000 (21:20 -0800)]
drm_hwcomposer: Do not close gem handle if queued
Fix an issue where if the same gem handle was queued twice we would
close the handle when the first one came out of the queue, leading to
a failure when calling drmModeAddFB2() on the second buffer.
Change-Id: I0bd35158215f74b51111d2e259bca3ba5125b203
Reviewed-on: https://chrome-internal-review.googlesource.com/200715
Tested-by: Allen Martin <amartin@nvidia.com>
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Lauri Peltonen [Mon, 2 Feb 2015 12:45:13 +0000 (14:45 +0200)]
drm_hwcomposer: Support Nvidia gralloc
When using an Nvidia gralloc implementation, ask Nvidia gralloc to import the
buffer_handle_t to the hwcomposer's drm device.
Arguably, the code to perform the import would more naturally belong to
drm_hwcomposer than Nvidia gralloc. But letting Nvidia gralloc do it has two
advantages. First, drm_hwcomposer doesn't need to include vendor headers or
link against vendor libraries. This means that it's easy to support both
drm_gralloc and Nvidia gralloc from the same default build of drm_hwcomposer.
Second, Nvidia gralloc will take care of properly setting up any vendor
specific metadata (such as tiling parameters) of the imported GEM handle.
Change-Id: I0f77fb301e7e0bff2a8cd7befeae4bc4892220ad
Reviewed-on: https://chrome-internal-review.googlesource.com/195115
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Tested-by: Stéphane Marchesin <marcheu@google.com>
Lauri Peltonen [Wed, 4 Feb 2015 14:55:31 +0000 (16:55 +0200)]
drm_hwcomposer: Support other drm nodes than card0
On dragon, card0 = Nouveau, card1 = TegraDRM.
Change-Id: Ie69639e40162ceb4ab99025dd9406ae44b7204c8
Reviewed-on: https://chrome-internal-review.googlesource.com/196021
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Tested-by: Stéphane Marchesin <marcheu@google.com>
Lauri Peltonen [Thu, 12 Feb 2015 11:54:33 +0000 (13:54 +0200)]
drm_hwcomposer: Fix fence leak
Hwcomposer is responsible for closing the acquire fences passed
in during hwc_set. Make sure that it does so, even if there is
an error condition.
Change-Id: I5c9096804c2613ec317c306dd361cb5f1a2ba5b2
Signed-off-by: Lauri Peltonen <lpeltonen@nvidia.com>
Reviewed-on: https://chrome-internal-review.googlesource.com/198356
Tested-by: Stéphane Marchesin <marcheu@google.com>
Commit-Queue: Stéphane Marchesin <marcheu@google.com>
Reviewed-by: Stéphane Marchesin <marcheu@google.com>
Sean Paul [Tue, 10 Feb 2015 19:10:58 +0000 (14:10 -0500)]
drm_hwcomposer: Remove drmSetMaster call
Now that gralloc is using a render node, we can remove
this call. This allows us to run as a non-root user as
well.
Change-Id: I46c9c16c7a9a169378e567d4973172f8392d441b
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Mon, 9 Feb 2015 07:24:11 +0000 (02:24 -0500)]
drm_hwcomposer: Use prime to import gem handles
Change-Id: Id5d5f9a61f092f33130fed4d8b8d00fcaf401dea
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Thu, 5 Feb 2015 17:04:22 +0000 (09:04 -0800)]
drm_hwcomposer: Include stdlib.h in the importer
Change-Id: I3fffc5e62c07de9561b6f998700a98862ebd5fc8
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Sean Paul [Wed, 4 Feb 2015 18:34:47 +0000 (10:34 -0800)]
drm_hwcomposer: Set display config on initialization
We shouldn't wait for surfaceflinger to set active config, initialize
the display with a config. For now we just choose the first config in
the list. This should change to a more sane choice, such as the preferred
mode or something similar.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ib063080c282cec28c9b0218c0ba5151d48b367ce
Sean Paul [Wed, 4 Feb 2015 18:19:55 +0000 (10:19 -0800)]
drm_hwcomposer: Ignore NULL display_contents
surfaceflinger will send in NULL display_contents in prepare/set,
make sure we don't blow up.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ia5085d4bd5e5928b52d81d14d027d0a162995946
Sean Paul [Wed, 4 Feb 2015 18:08:00 +0000 (10:08 -0800)]
drm_hwcomposer: Don't try to get configs for a disconnected connector
Short circuit getting the configs for connectors which are disconnected.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ieabbf08f4d4a6c8b03f948399113e3ad04a2d93a
Sean Paul [Wed, 4 Feb 2015 18:05:44 +0000 (10:05 -0800)]
drm_hwcomposer: Store active mode instead of config index
Since the config indices can change out from under us, store the
actual mode instead of an index. This avoids having to
reset active_config when we get a new list from the driver.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I09a1ffbdde16c44ccc8a1d2865f09a5da22c2e26
Sean Paul [Wed, 4 Feb 2015 17:29:15 +0000 (09:29 -0800)]
drm_hwcomposer: Always perform a setcrtc initially
Always do a setcrtc on the first set(), this ensures things
are set up the way we expect them to be.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I4279d4de64339e72f0e7f9b315b2b9695704c78c
Sean Paul [Mon, 26 Jan 2015 04:31:30 +0000 (23:31 -0500)]
drm_hwcomposer: Implement eventControl with vsync worker
Adds a new worker to handle events requested by eventControl.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I6d63bb43b5f112e2efb0c426e7fd59910fc98953
Sean Paul [Sat, 24 Jan 2015 06:34:31 +0000 (01:34 -0500)]
drm_hwcomposer: Implement release and retire fences using sw_sync
Once drm supports passing sync through, we'll move onto that.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I78bd5d380212b4aaec4b41dcba6cc882f1e5cc20
Sean Paul [Fri, 23 Jan 2015 06:41:13 +0000 (01:41 -0500)]
drm_hwcomposer: Reduce time spent in display_lock
This reduces the amount of time set will block on the
worker.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: If5d110ce78e98642265ffa7dcc25710bc227330b
Sean Paul [Fri, 23 Jan 2015 06:11:58 +0000 (01:11 -0500)]
drm_hwcomposer: Use queue buffer for pending sets
Instead of just using a front and back buffer, use a queue buffer
to allow more than one pending set.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I451acbcb08fac5191b76ec2e372fe612d227167c
Sean Paul [Thu, 22 Jan 2015 23:01:18 +0000 (18:01 -0500)]
drm_hwcomposer: Split gralloc out into an importer
Add the concept of an importer so we can plug in different
sources of bo.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I4f741ef4fa7c44e9cb31db61a146aed273854a69
Sean Paul [Thu, 22 Jan 2015 20:47:54 +0000 (15:47 -0500)]
drm_hwcomposer: Add a new set thread to post bo's
Adds a new set thread to wait on acquire fence, flip the bo,
and wait for it to be presented on screen.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: Ia931a7cbe287f4c744068fc80e476f81880bf608
Sean Paul [Tue, 20 Jan 2015 21:56:04 +0000 (16:56 -0500)]
drm_hwcomposer: Initial implementation
This adds a very basic hwcomposer implementation on top of
libdrm.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Change-Id: I472feb9bc08a4c4cd9849370c849d266ea58da9c
Geoff Mendal [Fri, 16 Jan 2015 18:46:20 +0000 (10:46 -0800)]
Initial empty repository