OSDN Git Service

android-x86/external-drm_gralloc.git
5 years agoRemove unused variables android-x86-7.1-r4 android-x86-8.1-r2 android-x86-8.1-r3 android-x86-8.1-r4 android-x86-8.1-r5 android-x86-9.0-r1 android-x86-9.0-r2
Chih-Wei Huang [Sat, 23 Feb 2019 03:58:29 +0000 (11:58 +0800)]
Remove unused variables

5 years agoInclude <string.h>
Chih-Wei Huang [Sat, 23 Feb 2019 03:58:11 +0000 (11:58 +0800)]
Include <string.h>

To provide the prototypes of strcmp(), memset(), etc.

5 years agogralloc_drm: open the DRM device of the primary framebuffer android-x86-8.1-r1
Chih-Wei Huang [Mon, 14 Jan 2019 00:19:29 +0000 (08:19 +0800)]
gralloc_drm: open the DRM device of the primary framebuffer

With the new added drmOpenByFB function in libdrm, it's easy to find
the correct DRM device of the primary framebuffer.

5 years agogralloc_pipe_drm: support rework PIPE_HANDLE_USAGE_* flags
Mauro Rossi [Tue, 30 Oct 2018 22:04:57 +0000 (23:04 +0100)]
gralloc_pipe_drm: support rework PIPE_HANDLE_USAGE_* flags

Changes due to commit 8ad12c8bec in mesa 18.3
("gallium: rework PIPE_HANDLE_USAGE_* flags")

Signed-off-by: Mauro Rosi <issor.oruam@gmail.com>
5 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Thu, 6 Sep 2018 08:54:37 +0000 (16:54 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

5 years agogralloc_pipe_drm: add storage_sample_count parameter into is_format_supported
Mauro Rossi [Thu, 2 Aug 2018 06:16:18 +0000 (08:16 +0200)]
gralloc_pipe_drm: add storage_sample_count parameter into is_format_supported

Apply changes to support mesa 18.2 branch commit
966f155623 ("gallium: add storage_sample_count parameter into is_format_supported")

5 years agoRemove radeonsi from the list of radeon_drivers android-x86-7.1-r3
Chih-Wei Huang [Tue, 24 Jul 2018 08:54:48 +0000 (16:54 +0800)]
Remove radeonsi from the list of radeon_drivers

The radeonsi uses the pipe driver.

5 years agogralloc_drm_pipe: add support for winsys handle types
Mauro Rossi [Sun, 3 Jun 2018 20:31:16 +0000 (22:31 +0200)]
gralloc_drm_pipe: add support for winsys handle types

Changes due to the following commits in mesa:

     d2eaff3 ("gallium: move winsys handle to it's own file.")
     b7ac077 ("gallium/winsys: rename DRM_API_HANDLE_* to WINSYS_HANDLE_*")

6 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Thu, 4 Jan 2018 03:35:58 +0000 (11:35 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

6 years agoFix insignificant warnings android-x86-7.1-r1 android-x86-7.1-r2
Chih-Wei Huang [Thu, 4 Jan 2018 03:33:05 +0000 (11:33 +0800)]
Fix insignificant warnings

6 years agogralloc_drm_kms: use local buffer for uevent_desc
Chih-Wei Huang [Thu, 4 Jan 2018 03:13:50 +0000 (11:13 +0800)]
gralloc_drm_kms: use local buffer for uevent_desc

I can't see a reason why uevent_desc should be static.
Besides, 2KB size is usually enough.

6 years agogralloc_drm_kms: try to find more primary display
Chih-Wei Huang [Thu, 4 Jan 2018 02:36:19 +0000 (10:36 +0800)]
gralloc_drm_kms: try to find more primary display

Consider DSI as the primary display as well as LVDS.

6 years agogralloc_drm_kms: fix possible segfault
Chih-Wei Huang [Wed, 3 Jan 2018 10:33:49 +0000 (18:33 +0800)]
gralloc_drm_kms: fix possible segfault

Check if the output is valid before using it.

6 years agogralloc_drm_kms: fix connector leak
Chih-Wei Huang [Wed, 3 Jan 2018 10:28:13 +0000 (18:28 +0800)]
gralloc_drm_kms: fix connector leak

Always free the connector resource.

6 years agoMerge remote-tracking branch 'x86/nougat-x86' into oreo-x86
Chih-Wei Huang [Thu, 23 Nov 2017 10:00:16 +0000 (18:00 +0800)]
Merge remote-tracking branch 'x86/nougat-x86' into oreo-x86

6 years agogralloc_drm: search the correct drm device
Chih-Wei Huang [Thu, 23 Nov 2017 09:55:45 +0000 (17:55 +0800)]
gralloc_drm: search the correct drm device

Instead of using a hardcoded drm device path, find the correct
drm device according to the driver name.

6 years agoContinue using BGRA_8888 for pipe drivers
Mauro Rossi [Sat, 18 Nov 2017 14:12:34 +0000 (15:12 +0100)]
Continue using BGRA_8888 for pipe drivers

vmwgfx and amdgpu have issues with RGBA_8888.
Let's keep using the old format until support is improved.

It partially reverts commit e94fe60a71c18e5b238a2c5f62a93cef06b2cedf
and it's similar to commit 9220bea48b0b84d63960e179c6e7064d2ea39e51.

The patch should be reverted when support RGBA_8888 is OK.

6 years agoRemove obsolete code
Chih-Wei Huang [Fri, 10 Nov 2017 03:25:43 +0000 (11:25 +0800)]
Remove obsolete code

We don't use any prebuilt GPU libraries.

6 years agogralloc_drm_pipe: update DRI_LIBRARY_PATH to /vendor
Mauro Rossi [Sat, 18 Nov 2017 10:19:59 +0000 (11:19 +0100)]
gralloc_drm_pipe: update DRI_LIBRARY_PATH to /vendor

With mesa 17.3 and later gallium_dri.so and driver symlinks
were moved to /vendor/{lib,lib64}/dri

DRI_LIBRARY_PATH in gralloc_drm_pipe is updated accordingly
in order to avoid error in opening driver for vmwgfx and admgpu

6 years agoMove libraries to /vendor
Chih-Wei Huang [Fri, 10 Nov 2017 03:29:58 +0000 (11:29 +0800)]
Move libraries to /vendor

As part of Treble project in Android O, all the device specific files
have to be located in the vendor partition.

6 years agogralloc_drm_intel: only use RGBA_8888 in flip mode
Chih-Wei Huang [Tue, 19 Sep 2017 03:16:40 +0000 (11:16 +0800)]
gralloc_drm_intel: only use RGBA_8888 in flip mode

For older GPUs without flip mode support, using RGBA_8888 will cause
significant performance drop as reported by Michael Goffioul.

6 years agoAvoid duplicated macro definition
Chih-Wei Huang [Sat, 9 Sep 2017 16:10:13 +0000 (00:10 +0800)]
Avoid duplicated macro definition

The common used macro MAX() may be defined by other headers and
the compiler may complain. Only define it if it's not defined.

6 years agonouveau: add support for Pascal chipsets
Mauro Rossi [Tue, 22 Aug 2017 21:50:49 +0000 (23:50 +0200)]
nouveau: add support for Pascal chipsets

NV_PASCAL 0x130 chipsets handling is added in gralloc_drm_nouveau.c.

6 years agodrm_gralloc: Enable allocation of flexible YUV420 buffers
Tomasz Figa [Tue, 8 Sep 2015 06:27:03 +0000 (15:27 +0900)]
drm_gralloc: Enable allocation of flexible YUV420 buffers

This patch adds necessary switch cases to enable allocation of flexible
YUV420 buffers. They currently always map to NV12 buffers.

Change-Id: I57daba972698033240f9086b7badfad75335be2e

6 years agodrm_gralloc: Implement lock_ycbcr method
Tomasz Figa [Tue, 8 Sep 2015 06:19:37 +0000 (15:19 +0900)]
drm_gralloc: Implement lock_ycbcr method

It is needed for flexible YUV formats. Currently only flexible YUV420 is
supported and always maps to NV12 format.

Change-Id: I4b2f2d1cdd3f2495b63d84438130dc7ab99fbf8c

6 years agoContinue using BGRA_8888 for nouveau and radeon
Chih-Wei Huang [Sun, 30 Jul 2017 15:28:52 +0000 (23:28 +0800)]
Continue using BGRA_8888 for nouveau and radeon

These GPUs don't support RGBA_8888 well. Let's keep using the old
format.

It partially reverts commit e94fe60a71c18e5b238a2c5f62a93cef06b2cedf.

The patch should be reverted once they support RGBA_8888.

6 years agogralloc_drm: allow GRALLOC_USAGE_HW_VIDEO_ENCODER buffers
Chih-Wei Huang [Wed, 26 Jul 2017 06:03:43 +0000 (14:03 +0800)]
gralloc_drm: allow GRALLOC_USAGE_HW_VIDEO_ENCODER buffers

Inspired by a similar patch of WuZhen <wuzhen@jidemail.com>
to enable screen recording.

Test: can pass PCMark for Android Video Editing tests of Work 2.0.

6 years agoSync GRALLOC_MODULE_PERFORM_GET_DRM_FD definition with gbm_gralloc
Chih-Wei Huang [Tue, 18 Jul 2017 06:33:47 +0000 (14:33 +0800)]
Sync GRALLOC_MODULE_PERFORM_GET_DRM_FD definition with gbm_gralloc

The GRALLOC_MODULE_PERFORM_GET_DRM_FD definition of gbm_gralloc differs
from drm_gralloc. To make them coexist, let's sync the definition.

6 years agoChange default pixel format to RGBA8888
Chih-Wei Huang [Mon, 3 Jul 2017 06:29:29 +0000 (14:29 +0800)]
Change default pixel format to RGBA8888

This is a WIP patch to change the default pixel format to RGBA8888.
The corresponding patches for Mesa are also needed.
Only i965 is tested.

7 years agoUpdate sw usage flags handling marshmallow-x86
Mauro Rossi [Sun, 14 May 2017 20:28:33 +0000 (22:28 +0200)]
Update sw usage flags handling

Inspired by Rob Herring suggestion and gbm_gralloc implementation

Add missing support for GRALLOC_USAGE_SW_READ_OFTEN,
GRALLOC_USAGE_SW_WRITE_OFTEN usage flags
mapping them to PIPE_BIND_LINEAR

Fixes the mouse cursor and message panes artifacts
happening with gralloc_drm_pipe, tested with amdgpudrmfb
No observed regression on swrast llvmpipe

7 years agogralloc_drm_pipe: fix the arguments of resource_get_handle android-x86-6.0-r3
Chih-Wei Huang [Fri, 17 Mar 2017 16:56:19 +0000 (00:56 +0800)]
gralloc_drm_pipe: fix the arguments of resource_get_handle

The second argument is pipe_context and the third is pipe_resource.

Correct the error introduced by commit 397a5a4.

7 years agoremove PIPE_BIND_TRANSFER_READ/WRITE for compatibility with mesa 12.1 android-x86-6.0-r2
Mauro Rossi [Fri, 9 Sep 2016 22:35:58 +0000 (00:35 +0200)]
remove PIPE_BIND_TRANSFER_READ/WRITE for compatibility with mesa 12.1

This changes are the necessary complement to corresponding
mesa commit 5981ab5 "gallium: remove PIPE_BIND_TRANSFER_READ/WRITE"

Fixes the following building errors:

external/drm_gralloc/gralloc_drm_pipe.c:102:11: error: use of undeclared identifier 'PIPE_BIND_TRANSFER_READ'
...
external/drm_gralloc/gralloc_drm_pipe.c:104:11: error: use of undeclared identifier 'PIPE_BIND_TRANSFER_WRITE'

7 years agoandroid: fix gralloc_drm_pipe building error with mesa 12.1
Mauro Rossi [Sat, 27 Aug 2016 15:41:46 +0000 (17:41 +0200)]
android: fix gralloc_drm_pipe building error with mesa 12.1

Fixes a building error introduced by commit 9daaa6f
"gallium: add a pipe_context parameter to resource_get_handle"

The new parameter was introduced for radeonsi future uses
and can be optionally set to NULL for now

7 years agogralloc_drm: show the unsupported error if drv is null android-x86-6.0-r1
Chih-Wei Huang [Mon, 11 Jul 2016 11:37:18 +0000 (19:37 +0800)]
gralloc_drm: show the unsupported error if drv is null

The unsupported driver message was suppressed by a subtle bug
of commit cbf96c0d which treats the latest checking as an else
case. Remove the unnecessary else.

Besides, logically on entering ENABLE_PIPE snippet, drv is
always null. No need to check it.

7 years agodrm_gralloc: fix random crash with wildpointer
Mark Yao [Mon, 27 Jun 2016 01:49:21 +0000 (21:49 -0400)]
drm_gralloc: fix random crash with wildpointer

two drm handle may use same bo, but there is no
reference protect. if one of the drm handle release
the bo, another handle's bo become a wildpointer,
any read/write on the wildpointer will cause system
unstable, crash.

Change-Id: Ieaca522e3372dba82c48961499b9b657ca33cd15
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoSupport multiple exteranl dispaly in mirror mode
WuZhen [Fri, 3 Jun 2016 06:01:09 +0000 (14:01 +0800)]
Support multiple exteranl dispaly in mirror mode

and extend support beyong hdmi.

Change-Id: Ib9550eac0330807ccd4c3919609cbf02ad98299d

7 years agoMaintain a list of connector outputs
WuZhen [Thu, 2 Jun 2016 16:38:15 +0000 (00:38 +0800)]
Maintain a list of connector outputs

Refactor code to support multiple mirrored outputs following code.

Change-Id: I60781d707ae68db2dbd2c4c4122b9183633a74be

7 years agoRename hdmi_output_mode
WuZhen [Thu, 2 Jun 2016 14:56:55 +0000 (22:56 +0800)]
Rename hdmi_output_mode

Rename it to drm_output_mode and move it into gralloc_drm_output
in preparation for folowing changes.

Change-Id: I488f395feede9c9a20eadb9145ebf46295ba4a71

7 years agoBest fit the external display
Ma Jian [Fri, 17 Jun 2016 03:51:07 +0000 (11:51 +0800)]
Best fit the external display

NO_REF_TASK
tested:
1) set persist.remixos.disp_best_fit to true
2) plugin the HDMI, the resolution should be the one fit the primary
   screen (i.e. the resolution should be larger than or equal to primery
   resolution, and it is the closest one)

3) set persist.remixos.disp_best_fit to false
4) plugin HDMI again, the external display will use the default
   resolution.

Change-Id: I80b0fe6e7cc676ce1915f07f267204734bfc645f

7 years agonouveau: add support for latest Kepler and Maxwell chipsets
Mauro Rossi [Sun, 3 Apr 2016 23:32:04 +0000 (01:32 +0200)]
nouveau: add support for latest Kepler and Maxwell chipsets

0x100 and 0x120 chipsets were added in gralloc_drm_nouveau.c

7 years agoandroid: fix gralloc_drm_pipe building error with mesa 11.3
Mauro Rossi [Mon, 28 Mar 2016 20:13:20 +0000 (22:13 +0200)]
android: fix gralloc_drm_pipe building error with mesa 11.3

Fixes a building error introduced by commit 82db518
"gallium: add external usage flags to resource_from(get)_handle (v2)"

parameter usage is required as a  combination of PIPE_HANDLE_USAGE_* flags,
PIPE_HANDLE_USAGE_READ_WRITE was used as the most general case

8 years agoavoid issue with devices that don't support blit.
WuZhen [Wed, 4 May 2016 05:35:33 +0000 (13:35 +0800)]
avoid issue with devices that don't support blit.

Change-Id: I398258147f9adcfbbcf2d92c7ba19887ea917bd0

8 years agoRevert "TEMP HACK: make non-standalone surfaceflinger work"
WuZhen [Mon, 2 May 2016 10:28:44 +0000 (18:28 +0800)]
Revert "TEMP HACK: make non-standalone surfaceflinger work"

This reverts commit b19bbdbf98742f0428f6f4265b5e80d569608abd.

Change-Id: I351b1c3f149924f38635058004eb91d84351646a

8 years agosupport hotplug with vanilla drm uevent
WuZhen [Tue, 3 May 2016 05:58:42 +0000 (13:58 +0800)]
support hotplug with vanilla drm uevent

Change-Id: Ifc83db7bfe6f330ca68e4454516f7a84b2433823

8 years agosupport hdmi clone more for intel GEN8+ gpus
WuZhen [Tue, 3 May 2016 03:49:32 +0000 (11:49 +0800)]
support hdmi clone more for intel GEN8+ gpus

Change-Id: I4e83eb55f2813c92873b8481b8ae9328add4c4f7

8 years agogralloc_drm: use pipe as a fallback instead of default
Mauro Rossi [Sun, 10 Apr 2016 14:22:58 +0000 (16:22 +0200)]
gralloc_drm: use pipe as a fallback instead of default

Current implementation prefers gralloc_drm_pipe over gralloc_drm_{driver}
while it may be the target solution, for nouveau it causes problems
because it is not anymore possible to use gralloc_drm_nouveau
whenever there is a driver ( e.g. swrast) in BoardConfig.mk BOARD_GPU_DRIVERS
not matching the list of valid drivers in drm_gralloc Android.mk

8 years agodrm_gralloc: pipe: add error handling for NULL load_pipe_screen
Rob Herring [Wed, 30 Mar 2016 15:59:36 +0000 (10:59 -0500)]
drm_gralloc: pipe: add error handling for NULL load_pipe_screen

Check load_pipe_screen for NULL and return in case dlsym returns a NULL
pointer. This can happen if the correct gallium driver is not enabled.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agoFix gralloc_drm_handle_t size mismatch on 32 and 64 bit builds, take 2
Rob Herring [Wed, 23 Mar 2016 20:48:39 +0000 (15:48 -0500)]
Fix gralloc_drm_handle_t size mismatch on 32 and 64 bit builds, take 2

On x86 there was still a size mismatch due to x86-32 structs not following
natural alignment for 64-bit values. Force the alignment of the union.
Also, there appeared to be some padding on the end, so move the union to
the end of the struct.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agogralloc_drm_pipe: ignore mode_quirk_vmwgfx
Chih-Wei Huang [Fri, 18 Mar 2016 09:21:52 +0000 (17:21 +0800)]
gralloc_drm_pipe: ignore mode_quirk_vmwgfx

Probably we don't need this quirk anymore?

8 years agoRevert "Changed format constants to match what vmwgfx driver expects"
Chih-Wei Huang [Thu, 17 Mar 2016 02:16:54 +0000 (10:16 +0800)]
Revert "Changed format constants to match what vmwgfx driver expects"

This partially reverts commit dc21193e3252ba2d6526546ba1d0c02116baf3ee.

8 years agoAndroid.mk: remove unneeded static libraries
Rob Herring [Tue, 16 Feb 2016 21:46:32 +0000 (15:46 -0600)]
Android.mk: remove unneeded static libraries

With the load_pipe_screen support, these libraries are no longer needed.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agoBuild pipe support by default
Rob Herring [Tue, 16 Feb 2016 21:45:25 +0000 (15:45 -0600)]
Build pipe support by default

Build pipe support by default when any unlisted driver is enabled. This way
gralloc doesn't have to be updated for every new driver.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agoWIP: synchronize gralloc entry points
Rob Clark [Mon, 31 Aug 2015 17:31:15 +0000 (13:31 -0400)]
WIP: synchronize gralloc entry points

Note entirely sure what synchronization guarantees android provides
before calling in to module.. but stuff inside gralloc module is
definately not thread-safe so slap a big lock around the outside.

8 years agoAdd gralloc_drm_get_prime_fd function
Rob Herring [Fri, 22 Jan 2016 16:35:14 +0000 (10:35 -0600)]
Add gralloc_drm_get_prime_fd function

Mesa EGL needs to retrieve prime fds from gralloc handles.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agopipe: use gallium loader function
Rob Herring [Thu, 21 Jan 2016 13:58:46 +0000 (07:58 -0600)]
pipe: use gallium loader function

Based on Rob Clark's work to avoid duplicating gallium driver loading
code and statically linking each driver's pipe and winsys libraries.

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agofix pipe building with upstream
Rob Herring [Wed, 20 Jan 2016 23:33:55 +0000 (17:33 -0600)]
fix pipe building with upstream

Signed-off-by: Rob Herring <robh@kernel.org>
8 years agoadd padding to gralloc_drm_handle_t
WuZhen [Wed, 6 Jan 2016 09:34:56 +0000 (17:34 +0800)]
add padding to gralloc_drm_handle_t

gralloc_drm_handle_t size differs for 32/64 bit process. thus on
x86_64, this will crash any 32bit app, add propper padding.

Change-Id: I03663b36dd841bf69c84973fd2f5e99741317c15

8 years agoMerge remote-tracking branch 'x86/lollipop-x86' into marshmallow-x86
Chih-Wei Huang [Fri, 13 Nov 2015 16:22:00 +0000 (00:22 +0800)]
Merge remote-tracking branch 'x86/lollipop-x86' into marshmallow-x86

8 years agofix GRALLOC_DRM_HANDLE_NUM_INTS definition for 64-bit lollipop-x86
Mauro Rossi [Sun, 8 Nov 2015 15:29:34 +0000 (16:29 +0100)]
fix GRALLOC_DRM_HANDLE_NUM_INTS definition for 64-bit

As highlighted by pstglia current definition of GRALLOC_DRM_HANDLE_NUM_INTS
causes issues with 64-bit, because a pointer is accounted as having size of
an integer, which is not applicable to 64-bit pointer

The same definition adopted in AOSP hardware/drm_gralloc master branch has
been used, without changing the structure of gralloc_drm_handle_t.

8 years agoRevert "gralloc: Remove localized hw specific pixel format"
Chih-Wei Huang [Fri, 9 Oct 2015 19:41:03 +0000 (03:41 +0800)]
Revert "gralloc: Remove localized hw specific pixel format"

This reverts commit 3e00d3255ba6de08761a6b8f40b838680d502d0b.

8 years agodrm_gralloc: Add drm_gralloc actions to gralloc_drm.h
Sean Paul [Mon, 9 Feb 2015 07:27:39 +0000 (02:27 -0500)]
drm_gralloc: Add drm_gralloc actions to gralloc_drm.h

Change-Id: If640f6ad7c6b904df59b5c5e164f184f1fc97170
Signed-off-by: Sean Paul <seanpaul@chromium.org>
8 years agoWIP: always use gralloc_drm_get_pid()
Rob Clark [Mon, 31 Aug 2015 17:32:21 +0000 (13:32 -0400)]
WIP: always use gralloc_drm_get_pid()

Rather than accessing gralloc_drm_pid directly.

8 years agoandroid: export drm_gralloc headers
Mauro Rossi [Sat, 29 Aug 2015 21:58:53 +0000 (23:58 +0200)]
android: export drm_gralloc headers

8 years agoMerge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86
Chih-Wei Huang [Sun, 26 Jul 2015 16:00:12 +0000 (00:00 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86

8 years agoCorrect the casting type for radeon drm calls
Paulo Sergio Travaglia [Sun, 28 Jun 2015 22:16:42 +0000 (19:16 -0300)]
Correct the casting type for radeon drm calls

It could be wrong to cast a pointer to a long type
(32-bit signed integer) and extend it to a uint64_t
(64-bit unsigned integer).

Cast it to uintptr_t as the xorg-video-ati does.

8 years agogralloc_drm_pipe: remove unnecessary headers kitkat-x86 android-x86-4.4-r3
Chih-Wei Huang [Fri, 19 Jun 2015 14:57:18 +0000 (22:57 +0800)]
gralloc_drm_pipe: remove unnecessary headers

9 years agoMerge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86
Chih-Wei Huang [Mon, 11 May 2015 01:39:22 +0000 (09:39 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86

9 years agoInclude newer/missing chipset families
Paulo Sergio Travaglia [Sun, 10 May 2015 16:13:11 +0000 (13:13 -0300)]
Include newer/missing chipset families

 - HAWAII and MULLINS added

 - changed 0x9649 from CHIP_FAMILY_SUMO to CHIP_FAMILY_SUMO2

 - added missing chipInfo for CHIP_FAMILY_VERDE, CHIP_FAMILY_OLAND, CHIP_FAMILY_BONAIRE and CHIP_FAMILY_KAVERI

9 years agogralloc_drm: make GRALLOC_USAGE_SW_READ_OFTEN be a valid usage
Chih-Wei Huang [Wed, 29 Apr 2015 15:09:50 +0000 (23:09 +0800)]
gralloc_drm: make GRALLOC_USAGE_SW_READ_OFTEN be a valid usage

It allows the camera to get a lock on the buffer.
This is required when a picture is taken.

Credited to Edgardo Gho <edgardogho@gmail.com>.

9 years agoMerge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86
Chih-Wei Huang [Wed, 29 Apr 2015 16:12:09 +0000 (00:12 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86

9 years agoEnable radeonsi on Android-x86
Paulo Sergio Travaglia [Thu, 23 Apr 2015 02:15:48 +0000 (23:15 -0300)]
Enable radeonsi on Android-x86

9 years agodo not use pipe driver for r600g
Chih-Wei Huang [Wed, 29 Apr 2015 09:15:32 +0000 (17:15 +0800)]
do not use pipe driver for r600g

Seems it is buggy.

9 years agoremove unnecessary paths in LOCAL_C_INCLUDES
Chih-Wei Huang [Wed, 29 Apr 2015 09:13:18 +0000 (17:13 +0800)]
remove unnecessary paths in LOCAL_C_INCLUDES

Now the include paths are imported automatically from libdrm*.

9 years agoMerge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86
Chih-Wei Huang [Sun, 19 Apr 2015 06:17:51 +0000 (14:17 +0800)]
Merge remote-tracking branch 'x86/kitkat-x86' into lollipop-x86

9 years agoChanged format constants to match what vmwgfx driver expects
Paulo Sergio Travaglia [Mon, 16 Feb 2015 23:37:05 +0000 (21:37 -0200)]
Changed format constants to match what vmwgfx driver expects

When allocating a new buffer using pipe driver, pipe constants
are used to define a format based on corresponding HAL_PIXEL_FORMAT
However, vmwgfx driver expects other constants
(SVGA3D_A8R8G8B8, SVGA3D_X8R8G8B8, SVGA3D_R5G6B5, etc)

Changed the returning constants to match what driver expects.

v2: [cwhuang]
 - Use the constants defined in svga3d_types.h.
 - Use C99 standard to avoid building errors with mesa 10.6.

9 years agonouveau: undefine SW_INDICATOR_FULLY_DISABLES_TILING
Chih-Wei Huang [Thu, 29 Jan 2015 06:16:34 +0000 (14:16 +0800)]
nouveau: undefine SW_INDICATOR_FULLY_DISABLES_TILING

Based on the work by pstglia.

9 years agogralloc_drm_pipe: fix building errors with mesa 10.4
Chih-Wei Huang [Thu, 22 Jan 2015 10:18:26 +0000 (18:18 +0800)]
gralloc_drm_pipe: fix building errors with mesa 10.4

9 years agoadd radeonsi to pci_id_driver_map.h
Chih-Wei Huang [Thu, 22 Jan 2015 02:48:03 +0000 (10:48 +0800)]
add radeonsi to pci_id_driver_map.h

9 years agonouveau: bring some sw_indicator love
Emil Velikov [Tue, 11 Nov 2014 03:11:43 +0000 (03:11 +0000)]
nouveau: bring some sw_indicator love

Based on some work by pstglia, one needs to switch off (partially or
fully?) the tiling when creating the BO.

Comment/uncomment the SW_INDICATOR_FULLY_DISABLES_TILING define to
toggle between the two.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agonouveau: update against libdrm_nouveau-2.0
Emil Velikov [Fri, 1 Aug 2014 22:19:03 +0000 (23:19 +0100)]
nouveau: update against libdrm_nouveau-2.0

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agoall: Cleanup duplicated macros.
Emil Velikov [Fri, 1 Aug 2014 19:33:17 +0000 (20:33 +0100)]
all: Cleanup duplicated macros.

 - Move MAX macro to gralloc_drm.h
 - Drop the freedreno's duplicated ALIGN macro.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agogralloc_drm_pipe: bail out as soon as the correct screen_create is called
Emil Velikov [Fri, 1 Aug 2014 19:21:30 +0000 (20:21 +0100)]
gralloc_drm_pipe: bail out as soon as the correct screen_create is called

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agogralloc_drm: bail out early when we find the driver
Emil Velikov [Fri, 1 Aug 2014 19:11:07 +0000 (20:11 +0100)]
gralloc_drm: bail out early when we find the driver

... rather than going through all the conditionals.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agofix building issues of 64-bit targets
Chih-Wei Huang [Sun, 30 Nov 2014 17:46:20 +0000 (01:46 +0800)]
fix building issues of 64-bit targets

Just change the 'data' field of gralloc_drm_handle_t
to be a pointer to struct gralloc_drm_bo_t.

Fix some warnings as well.

9 years agoenable multiarch builds
Chih-Wei Huang [Thu, 6 Nov 2014 02:50:12 +0000 (10:50 +0800)]
enable multiarch builds

Convert LOCAL_MODULE_PATH to LOCAL_MODULE_RELATIVE_PATH
to support 64-bit targets.

9 years agofreedreno: completely untested initial support
Rob Clark [Fri, 1 Aug 2014 19:02:02 +0000 (20:02 +0100)]
freedreno: completely untested initial support

v2: [Emil Velikov]
 - drmGetVersion returns the kernel module name.
 - Add it to the build :)
 - freedreno_map returns void * while gralloc::map expects int.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
9 years agogralloc_drm: improve log android-x86-4.4-r2
Chih-Wei Huang [Thu, 1 Jan 2015 08:21:46 +0000 (16:21 +0800)]
gralloc_drm: improve log

10 years agoradeon: fix tiling config for family older than 06xx android-x86-4.4-r1
pstglia [Mon, 19 May 2014 03:51:21 +0000 (11:51 +0800)]
radeon: fix tiling config for family older than 06xx

10 years agoget rid of HAL pixelformats 5551 and 4444
Chih-Wei Huang [Tue, 24 Sep 2013 17:33:33 +0000 (01:33 +0800)]
get rid of HAL pixelformats 5551 and 4444

10 years agoradeon: update chipinfo and remove outdated headers
Chih-Wei Huang [Sun, 4 Aug 2013 08:03:37 +0000 (16:03 +0800)]
radeon: update chipinfo and remove outdated headers

Copied radeon.h (radeon_probe.h) and radeon_chipinfo_gen.h from master branch
of http://cgit.freedesktop.org/xorg/driver/xf86-video-ati

10 years agor600g: fix building errors with the latest mesa
Chih-Wei Huang [Fri, 5 Jul 2013 18:57:13 +0000 (02:57 +0800)]
r600g: fix building errors with the latest mesa

10 years agogralloc_drm_intel: fix i915 issues: failed to exec batch
Chih-Wei Huang [Tue, 4 Jun 2013 14:38:15 +0000 (22:38 +0800)]
gralloc_drm_intel: fix i915 issues: failed to exec batch

Old i915 doesn't have I915_EXEC_BLT bit. Only set the bit if it's available.

10 years agoallow to force graphics mode
Somebody [Fri, 29 Mar 2013 05:10:14 +0000 (13:10 +0800)]
allow to force graphics mode

This patch adds in a system property "debug.drm.mode.force", which works
*similarly* to "debug.drm.mode". XRESxYRES[@REFRESHRATE].

10 years agoTEMP HACK: make non-standalone surfaceflinger work
Chih-Wei Huang [Tue, 5 Mar 2013 04:04:31 +0000 (12:04 +0800)]
TEMP HACK: make non-standalone surfaceflinger work

10 years agochange hal name to gralloc.drm
Chih-Wei Huang [Wed, 16 Jan 2013 01:53:17 +0000 (09:53 +0800)]
change hal name to gralloc.drm

10 years agoFix refcounting of mapped bo's
Andy Ross [Tue, 4 Jun 2013 18:32:29 +0000 (11:32 -0700)]
Fix refcounting of mapped bo's

Buffer objects created locally by gralloc_drm_bo_create() would have
their refcount properly initialized to 1, but those received from
other processes via the drv alloc function would be left at zero, so
the delete check in gralloc_drm_bo_decref() would not destroy them as
the refcount would wrap negative.  The buffer would then leak forever
until the mapping process (often surfaceflinger!) exitted.

Issue: AXIA-2991
Change-Id: I1a0c73b21cfbc67b441970002fd71712112e1871
Signed-off-by: Andy Ross <andy.ross@windriver.com>
11 years agogralloc: map HAL format RGBX_8888 to drm format XBGR8888
Tapani Pälli [Tue, 21 May 2013 04:50:18 +0000 (07:50 +0300)]
gralloc: map HAL format RGBX_8888 to drm format XBGR8888

currently we end up creating framebuffers with wrong format for RGBX
users and set_plane with these would show wrong colors, one example
is the menu screen of the glb27 application.

Change-Id: Ifa051a4c5e9f39a6427ae2864ac06955cb48ad2b
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
11 years agogralloc: provide methods for hwc to change handle of a plane
Tapani Pälli [Fri, 3 May 2013 07:08:54 +0000 (10:08 +0300)]
gralloc: provide methods for hwc to change handle of a plane

Patch changes reserve_plane to get id number as additional parameter.
This can be used by hwc to make changes to a particular plane. New
api hwc_set_plane_handle is introduced so that hwc can change the
buffer handle of a plane, this is required because after plane has
been reserved for a particular ui layer, this handle can change as
the layer is typically multibuffered.

Change-Id: I32d711ff3565ae9e8f5b8a6691c22b03a50cefe7
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
11 years agoMerge "gralloc: check possible crtcs of plane against primary output"
Matthew K Gumbel [Thu, 9 May 2013 22:47:30 +0000 (15:47 -0700)]
Merge "gralloc: check possible crtcs of plane against primary output"

11 years agoMerge "gralloc: Remove localized hw specific pixel format"
Andrew P Boie [Thu, 9 May 2013 21:33:09 +0000 (14:33 -0700)]
Merge "gralloc: Remove localized hw specific pixel format"