OSDN Git Service

android-x86/external-drm_gralloc.git
11 years agogralloc: yuv offset calculation function for mesa
Tapani Pälli [Wed, 12 Dec 2012 11:19:11 +0000 (13:19 +0200)]
gralloc: yuv offset calculation function for mesa

Patch adds add api for mesa to query component offsets for
yuv buffer handles.

Change-Id: Ib477627ad812f5b6352665d00fb2bb3b10fe5b8e
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: add NV12 format enum and fb allocation support for it
Tapani Pälli [Fri, 14 Dec 2012 08:43:39 +0000 (10:43 +0200)]
gralloc: add NV12 format enum and fb allocation support for it

Change-Id: If1c92810a17c60c29239f5384d6e971b015dd174
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: use headers from drm and mesa instead of local copy
Tapani Pälli [Thu, 8 Nov 2012 07:52:27 +0000 (09:52 +0200)]
gralloc: use headers from drm and mesa instead of local copy

Patch removes local outdated headers for intel hw and starts
to depend on ones from libdrm and mesa projects, this makes sure
we are up to date with new pci id's etc.

intel_init_kms_features required some fixing because of changed
macros, patch also adds GEN7 check in place for IVB and HSW.

Change-Id: Iee6375ceb558baf4334e3b9b5d26210406aa7b71
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: no cloned mode on platforms with hdmi as primary
Tapani Pälli [Wed, 7 Nov 2012 14:06:03 +0000 (16:06 +0200)]
gralloc: no cloned mode on platforms with hdmi as primary

On some platforms we might have only HDMI connector, on those
platforms do not attempt to use cloned/extended mode with HDMI.

Change-Id: If0f21986030e4e97991202bd8168d7c9e25de493
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: hdmi cloned mode support
Tapani Pälli [Thu, 4 Oct 2012 13:01:27 +0000 (16:01 +0300)]
gralloc: hdmi cloned mode support

Patch implements simple support for cloned mode hdmi by introducing
primary and hdmi outputs that are updated respectively.

Current implementation is rather naive and assumes hdmi can drive
same mode as the local lvds. Only cloned mode is supported but can be
extended later to support extended mode when hwcomposer is available
for controlling this behaviour.

HDMI hotplug is implemented as a separate observer thread that
listens to uevents and reads hdmi connection state from there, this
requires switch support from the kernel hdmi driver.

Change-Id: I147273bbe4d21ab9f390f38c9a5f945530c8fd2e
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@linux.intel.com>
11 years agoRevert "gralloc: hdmi cloned mode support"
Daniel Leung [Tue, 23 Oct 2012 22:31:34 +0000 (15:31 -0700)]
Revert "gralloc: hdmi cloned mode support"

This reverts commit 2d2758bca0f962ef21673dbe29df4c042d7f3254.

11 years agogralloc: hdmi cloned mode support
Tapani Pälli [Thu, 4 Oct 2012 13:01:27 +0000 (16:01 +0300)]
gralloc: hdmi cloned mode support

Patch implements simple support for cloned mode hdmi by introducing
primary and hdmi outputs that are updated respectively.

Current implementation is rather naive and assumes hdmi can drive
same mode as the local lvds. Only cloned mode is supported but can be
extended later to support extended mode when hwcomposer is available
for controlling this behaviour.

HDMI hotplug is implemented as a separate observer thread that
listens to uevents and reads hdmi connection state from there, this
requires switch support from the kernel hdmi driver.

Change-Id: I1d5873214d672563789f4953a892de60539eca88
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Signed-off-by: Matt Gumbel <matthew.k.gumbel@linux.intel.com>
11 years agogralloc_drm_intel: set gem handle for each bo
Tapani Pälli [Fri, 31 Aug 2012 09:56:31 +0000 (12:56 +0300)]
gralloc_drm_intel: set gem handle for each bo

not just fbs, potentially anything can be used as framebuffer by kms code

Change-Id: Ib710bb62ae23cf58a987c6614306711dedb11cbf
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: split resolve_drm_format
Tapani Pälli [Fri, 31 Aug 2012 09:55:26 +0000 (12:55 +0300)]
gralloc: split resolve_drm_format

refactored code so that drm_format_from_hal helper
can be used from other parts of code.

Change-Id: Ibaa3e483b2987c96d9651b2886360402e2c5642d
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: introduce planeresources
Tapani Pälli [Fri, 31 Aug 2012 09:54:45 +0000 (12:54 +0300)]
gralloc: introduce planeresources

maintain planeresources and additional helper structure
gralloc_drm_plane_t for planes, also prints out plane formats on startup.

Change-Id: Ibc717d646acd581b8c247c22d269260e78d92fd9
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: add refcount to gralloc_drm_bo_t
Tapani Pälli [Wed, 1 Aug 2012 13:06:00 +0000 (16:06 +0300)]
gralloc: add refcount to gralloc_drm_bo_t

This is an basic enabler for gralloc to let buffers live while they are still
in use by gralloc (for example during scanout), otherwise Android may choose
to destroy them while they are still needed. This facility will get used with
upcoming plane support and direct rendering support.

Change-Id: I2f0bc595846a68e8d2feb5138b022d16f207e2b5
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc : use drmModeAddFB2
Tapani Pälli [Wed, 30 May 2012 07:59:29 +0000 (10:59 +0300)]
gralloc : use drmModeAddFB2

start using drmModeAddFB2 API, this is enabler to create framebuffers
with YUV pixel formats that can be shown on hardware overlay.

Change-Id: I700c752ada119222573ab286a8b231092c3250c0
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
11 years agogralloc: Add support for prebuilt gralloc libs
Andrew Boie [Tue, 25 Sep 2012 23:19:24 +0000 (16:19 -0700)]
gralloc: Add support for prebuilt gralloc libs

If the user sets BOARD_GPU_DRIVERS to 'prebuilt' and passes a path
to the prebuilt gralloc binary via BOARD_GPU_DRIVER_BINARY, then
that prebuilt gralloc image will be used instead of building it from
source here.

Change-Id: I0fe3bc1919cacc38087afe3f76e4b8391975edbd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
12 years agoChange all occurances of LOGE to ALOGE, LOGW to ALOGW and LOGI to ALOGI due to change...
Charles Johnson [Wed, 11 Jul 2012 00:51:32 +0000 (17:51 -0700)]
Change all occurances of LOGE to ALOGE, LOGW to ALOGW and LOGI to ALOGI due to change in Jelly Bean.

Signed-off-by: Charles Johnson <charles.f.johnson@intel.com>
modified:   gralloc.c
modified:   gralloc_drm.c
modified:   gralloc_drm_intel.c
modified:   gralloc_drm_kms.c
modified:   gralloc_drm_nouveau.c
modified:   gralloc_drm_pipe.c
modified:   gralloc_drm_radeon.c

Change-Id: Idd9e533eab366d9f9dc199d961891255a66384a2

12 years agoadd support for YUV formats honeycomb-x86
Chia-I Wu [Thu, 27 Oct 2011 10:01:23 +0000 (18:01 +0800)]
add support for YUV formats

12 years agoremove an unnecessary include
Chia-I Wu [Thu, 8 Sep 2011 04:18:53 +0000 (12:18 +0800)]
remove an unnecessary include

12 years agolog connector info
Chia-I Wu [Thu, 8 Sep 2011 04:05:00 +0000 (12:05 +0800)]
log connector info

Log the number of modes available, what the best mode is, and etc.

13 years agoremove outdated BOARD_USES_*
Chia-I Wu [Mon, 29 Aug 2011 06:57:41 +0000 (14:57 +0800)]
remove outdated BOARD_USES_*

13 years agoremove first drm_kms_wait_for_post call
Chia-I Wu [Mon, 29 Aug 2011 06:54:12 +0000 (14:54 +0800)]
remove first drm_kms_wait_for_post call

It always fails without the CRTC being set.

13 years agofix build errors
Chia-I Wu [Mon, 29 Aug 2011 06:52:55 +0000 (14:52 +0800)]
fix build errors

Introduced by the last commit.

13 years agovmwgfx: assorted fixes
Chia-I Wu [Wed, 24 Aug 2011 06:07:06 +0000 (14:07 +0800)]
vmwgfx: assorted fixes

Based on trial and error, we know

 - drm_kms_wait_for_post() hangs the VM
 - drmModeDirtyFB() should be called whenever the front buffer changes
 - drmModePageFlip() is not supported

They might not be entirely correct, but fixing them makes drm_gralloc
work.

13 years agoupdate pci_ids
Chia-I Wu [Wed, 24 Aug 2011 06:05:29 +0000 (14:05 +0800)]
update pci_ids

13 years agoradeon: use a table to detect chip family gingerbread-x86
Chia-I Wu [Wed, 10 Aug 2011 09:43:28 +0000 (17:43 +0800)]
radeon: use a table to detect chip family

13 years agodrop the 'c' suffix from i915c/i965c
Chia-I Wu [Wed, 3 Aug 2011 04:35:06 +0000 (13:35 +0900)]
drop the 'c' suffix from i915c/i965c

13 years agorevise gralloc_drm bo interface
Chia-I Wu [Sun, 31 Jul 2011 07:35:21 +0000 (16:35 +0900)]
revise gralloc_drm bo interface

Make it more intuitive to use.

13 years agoadd more functions to gralloc_drm kms interface
Chia-I Wu [Sun, 31 Jul 2011 08:09:11 +0000 (17:09 +0900)]
add more functions to gralloc_drm kms interface

Make it more complete.

13 years agoadd support for debug.drm.mode
Chia-I Wu [Sat, 30 Jul 2011 08:06:31 +0000 (17:06 +0900)]
add support for debug.drm.mode

The mode string is "<xres>x<yres>[@<bpp>]".

13 years agoprotect against NULL handle
Chia-I Wu [Sat, 30 Jul 2011 06:43:48 +0000 (15:43 +0900)]
protect against NULL handle

13 years agomake sure the driver is initialized before registering
Chia-I Wu [Sat, 30 Jul 2011 07:31:24 +0000 (16:31 +0900)]
make sure the driver is initialized before registering

13 years agoallow FB to be mapped
Chia-I Wu [Sat, 30 Jul 2011 07:29:54 +0000 (16:29 +0900)]
allow FB to be mapped

This is useful for testing software renderer with FB.

13 years agomap a bo only when it is locked for CPU access
Chia-I Wu [Fri, 29 Jul 2011 11:43:12 +0000 (20:43 +0900)]
map a bo only when it is locked for CPU access

To match the doc a little better.

13 years agoclose bo on unregister()
Chia-I Wu [Fri, 29 Jul 2011 10:57:04 +0000 (19:57 +0900)]
close bo on unregister()

Not sure if a remote process ever destroys a bo.  But let register()
opens a bo and unregister() closes it.

13 years agoandroid: use BOARD_GPU_DRIVERS
Chia-I Wu [Fri, 22 Jul 2011 05:42:19 +0000 (13:42 +0800)]
android: use BOARD_GPU_DRIVERS

13 years agoradeon: zero the newly allocated bo
Chia-I Wu [Mon, 18 Jul 2011 09:47:28 +0000 (17:47 +0800)]
radeon: zero the newly allocated bo

13 years agoradeon: refactor bo allocation
Chia-I Wu [Mon, 18 Jul 2011 09:43:31 +0000 (17:43 +0800)]
radeon: refactor bo allocation

13 years agoradeon: verbose debug messages on errors
Chia-I Wu [Mon, 18 Jul 2011 05:24:05 +0000 (13:24 +0800)]
radeon: verbose debug messages on errors

13 years agoimprove bo validation a little bit
Chia-I Wu [Fri, 15 Jul 2011 02:46:06 +0000 (10:46 +0800)]
improve bo validation a little bit

13 years agoradeon: enable tiling
Chia-I Wu [Fri, 15 Jul 2011 02:18:58 +0000 (10:18 +0800)]
radeon: enable tiling

13 years agoradeon: detect chip family
Chia-I Wu [Thu, 14 Jul 2011 06:42:30 +0000 (14:42 +0800)]
radeon: detect chip family

This should not change the behavior in any way.

13 years agosupport other drivers in pipe
Chia-I Wu [Sun, 10 Jul 2011 12:17:41 +0000 (20:17 +0800)]
support other drivers in pipe

Tested with r600g.

13 years agolet drivers decide the fb format
Chia-I Wu [Sun, 10 Jul 2011 15:12:26 +0000 (23:12 +0800)]
let drivers decide the fb format

13 years agoadd (untested) copy support to pipe
Chia-I Wu [Mon, 13 Jun 2011 06:34:21 +0000 (14:34 +0800)]
add (untested) copy support to pipe

This is why we love pipe.

13 years agoadd (untested) pipe support
Chia-I Wu [Mon, 13 Jun 2011 00:48:44 +0000 (08:48 +0800)]
add (untested) pipe support

13 years agoadd nouveau support
Chia-I Wu [Sun, 12 Jun 2011 10:43:33 +0000 (18:43 +0800)]
add nouveau support

13 years agoinitial commit
Chia-I Wu [Sun, 12 Jun 2011 08:21:30 +0000 (16:21 +0800)]
initial commit