[PATCH v5 5/9] drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0

2018-10-19 Thread Alexandru Gheorghe
. This had been discussed here. [1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel_names==2018-09-13_html=true Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_framebuffer.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v5 9/9] drm/selftests: Add tests for drm_format_info* helpers

2018-10-19 Thread Alexandru Gheorghe
Add selftests for the following newly added functions: - drm_format_info_block_width - drm_format_info_block_height - drm_format_info_min_pitch Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/selftests/Makefile| 3 +- .../gpu/drm/selftests/drm_modeset_selftests.h | 3

[PATCH v5 7/9] drm/afbc: Add AFBC modifier usage documentation

2018-10-19 Thread Alexandru Gheorghe
From: Brian Starkey AFBC is a flexible, proprietary, lossless compression protocol and format, with a number of defined DRM format modifiers. To facilitate consistency and compatibility between different AFBC producers and consumers, document the expectations for usage of the AFBC DRM format

[PATCH v5 8/9] drm/selftest: Refactor test-drm_plane_helper

2018-10-19 Thread Alexandru Gheorghe
The idea is to split test implementations in different compilation units, but have one single place where we define the list of tests, in this case(drm_modeset_selftests.h). Signed-off-by: Alexandru Gheorghe --- ...er_selftests.h => drm_modeset_selftests.h} | 0 .../drm/selftests/t

[PATCH v5 0/9] Add method to describe tile/bit_level_packed formats

2018-10-19 Thread Alexandru Gheorghe
==2018-09-13_html=true [4] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel_names==2018-09-14_html=true Alexandru Gheorghe (7): drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info

[PATCH v5 4/9] drm: mali-dp: Enable Mali-DP tiled buffer formats

2018-10-19 Thread Alexandru Gheorghe
Enable the following formats - DRM_FORMAT_X0L0: DP650 - DRM_FORMAT_X0L2: DP550, DP650 Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_hw.c | 14 +++--- drivers/gpu/drm/arm/malidp_planes.c | 23 +-- 2 files changed, 32 insertions(+), 5 deletions

[PATCH v5 3/9] drm/fourcc: Add fourcc for Mali linear tiled formats

2018-10-19 Thread Alexandru Gheorghe
Mali-DP implements a number of tiled yuv formats which are not currently described in drm_fourcc.h. This adds those definitions and describes their memory layout by using the newly added char_per_block, block_w, block_h. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 12

[PATCH v5 6/9] drm/fourcc: Add AFBC yuv fourccs for Mali

2018-10-19 Thread Alexandru Gheorghe
From: Brian Starkey As we look to enable AFBC using DRM format modifiers, we run into problems which we've historically handled via vendor-private details (i.e. gralloc, on Android). AFBC (as an encoding) is fully flexible, and for example YUV data can be encoded into 1, 2 or 3 encoded

[PATCH v5 2/9] drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info

2018-10-19 Thread Alexandru Gheorghe
for computing the minimum required pitch. - Improve/cleanup documentation Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fb_cma_helper.c | 21 ++- drivers/gpu/drm/drm_fb_helper.c | 6 ++ drivers/gpu/drm/drm_fourcc.c | 62 drivers

[PATCH v5 1/9] drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation

2018-10-19 Thread Alexandru Gheorghe
In-line member documentation seems to be desired way of documenting structure members. This change had been suggested by Daniel Vetter here: https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html Signed-off-by: Alexandru Gheorghe --- include/drm/drm_fourcc.h | 30

[PATCH v4 8/9] drm/selftests: Add module_exit for test-drm-helper

2018-10-12 Thread Alexandru Gheorghe
test-drm-helper.ko can't be rmmod-ed because it doesn't have a module_exit, that could be very inconvenient especially in the development stage where we usually want to re-run the tests without any rebooting. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/selftests/test-drm-helper.c | 5

[PATCH v4 4/9] drm: mali-dp: Enable Mali-DP tiled buffer formats

2018-10-12 Thread Alexandru Gheorghe
Enable the following formats - DRM_FORMAT_X0L0: DP650 - DRM_FORMAT_X0L2: DP550, DP650 Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_hw.c | 14 +++--- drivers/gpu/drm/arm/malidp_planes.c | 23 +-- 2 files changed, 32 insertions(+), 5 deletions

[PATCH v4 5/9] drm: Extend framebuffer_check to handle formats with cpp/char_per_block 0

2018-10-12 Thread Alexandru Gheorghe
. This had been discussed here. [1] https://people.freedesktop.org/~cbrill/dri-log/?channel=dri-devel_names==2018-09-13_html=true Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_framebuffer.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm

[PATCH v4 0/9] Add method to describe tile/bit_level_packed formats

2018-10-12 Thread Alexandru Gheorghe
-log/?channel=dri-devel_names==2018-09-14_html=true Alexandru Gheorghe (7): drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info drm/fourcc: Add fourcc for Mali linear tiled formats drm

[PATCH v4 7/9] drm/afbc: Add AFBC modifier usage documentation

2018-10-12 Thread Alexandru Gheorghe
From: Brian Starkey AFBC is a flexible, proprietary, lossless compression protocol and format, with a number of defined DRM format modifiers. To facilitate consistency and compatibility between different AFBC producers and consumers, document the expectations for usage of the AFBC DRM format

[PATCH v4 2/9] drm/fourcc: Add char_per_block, block_w and block_h in drm_format_info

2018-10-12 Thread Alexandru Gheorghe
for computing the minimum required pitch. - Improve/cleanup documentation Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fb_cma_helper.c | 21 ++- drivers/gpu/drm/drm_fb_helper.c | 6 ++ drivers/gpu/drm/drm_fourcc.c | 62 drivers

[PATCH v4 9/9] drm/selftests: Add tests for drm_format_info* helpers

2018-10-12 Thread Alexandru Gheorghe
Add selftests for the following newly added functions: - drm_format_info_block_width - drm_format_info_block_height - drm_format_info_min_pitch Signed-off-by: Alexandru Gheorghe --- .../gpu/drm/selftests/drm_helper_selftests.h | 3 + drivers/gpu/drm/selftests/test-drm-helper.c | 277

[PATCH v4 6/9] drm/fourcc: Add AFBC yuv fourccs for Mali

2018-10-12 Thread Alexandru Gheorghe
From: Brian Starkey As we look to enable AFBC using DRM format modifiers, we run into problems which we've historically handled via vendor-private details (i.e. gralloc, on Android). AFBC (as an encoding) is fully flexible, and for example YUV data can be encoded into 1, 2 or 3 encoded

[PATCH v4 1/9] drm: fourcc: Convert drm_format_info kerneldoc to in-line member documentation

2018-10-12 Thread Alexandru Gheorghe
In-line member documentation seems to be desired way of documenting structure members. This change had been suggested by Daniel Vetter here: https://lists.freedesktop.org/archives/dri-devel/2018-October/192176.html Signed-off-by: Alexandru Gheorghe --- include/drm/drm_fourcc.h | 30

[PATCH v4 3/9] drm/fourcc: Add fourcc for Mali linear tiled formats

2018-10-12 Thread Alexandru Gheorghe
Mali-DP implements a number of tiled yuv formats which are not currently described in drm_fourcc.h. This adds those definitions and describes their memory layout by using the newly added char_per_block, block_w, block_h. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 12

[PATCH v2] drm/malidp: Enable MMU prefetch on Mali-DP650

2018-10-01 Thread Alexandru Gheorghe
if possible. Changes since v1: - For imported buffers use the already populated drm_gem_cma_object.sgt instead of calling driver.gem_prime_get_sg_table, which works just for buffers allocated through the gem_cma API. Signed-off-by: Jamie Fox Signed-off-by: Alexandru Gheorghe [rebased and re

[PATCH v2] drm: Clarify DRM_MODE_REFLECT_X/Y documentation

2018-09-10 Thread Alexandru Gheorghe
, suggestested by Daniel Vetter. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_blend.c | 22 ++ include/uapi/drm/drm_mode.h | 3 ++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_blend.c b/drivers/gpu/drm/drm_blend.c index 402b62d3f072

[PATCH v3] drm: Fix crtc color management when doing suspend/resume

2018-09-10 Thread Alexandru Gheorghe
by the move of drm_atomic_crtc_set_property in drm_atomic_uapi.c. Signed-off-by: Alexandru Gheorghe Reviewed-by: Ville Syrjälä --- drivers/gpu/drm/drm_atomic_helper.c | 8 +++- drivers/gpu/drm/drm_atomic_uapi.c | 12 +++- drivers/gpu/drm/drm_fb_helper.c | 1 - 3 files changed

[PATCH v2] drm: Fix crtc color management when doing suspend/resume

2018-08-28 Thread Alexandru Gheorghe
, suggested by Maarten Lankhorst. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic.c| 12 +++- drivers/gpu/drm/drm_atomic_helper.c | 8 +++- drivers/gpu/drm/drm_fb_helper.c | 1 - 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm

[PATCH] drm: Fix crtc color management when doing suspend/resume

2018-08-23 Thread Alexandru Gheorghe
if coefficients need to be reprogrammed, but that never happens because the save state has color_mgmt_changed set to 0. Fix that by setting color_mgmt_changed to true if the crtc duplicated state differs from the reset state. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic_helper.c | 7

[PATCH v2] drm/malidp: Fix writeback in NV12

2018-08-22 Thread Alexandru Gheorghe
write them the first time NV12 is programmed, suggested by Brian Starkey, here [1] [1] https://lists.freedesktop.org/archives/dri-devel/2018-August/186819.html Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_hw.c | 25 +++-- drivers/gpu/drm/arm/malidp_hw.h

[PATCH v2 4/5] drm: Add support for handling linear tile formats

2018-08-21 Thread Alexandru Gheorghe
/subsampling. Anyway, I think it's best to just put an warning in there and handle it when someone tries to add support for them. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic.c | 8 +++ drivers/gpu/drm/drm_fb_cma_helper.c | 11 - drivers/gpu/drm

[PATCH v2 5/5] drm: mali-dp: Enable mali specific buffer formats

2018-08-21 Thread Alexandru Gheorghe
Enable the following formats - DRM_FORMAT_XYUV - DRM_FORMAT_XVYU2101010 - DRM_FORMAT_X0L0 - DRM_FORMAT_X0L2 - DRM_FORMAT_P010 Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_hw.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm

[PATCH v2 3/5] drm/i915: Set tile sizes in drm_format_info

2018-08-21 Thread Alexandru Gheorghe
Two new fields had been added to drm_format_info struct, tile_w and tile_h, this need to be set to 1 for all non-tiled formats. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/i915/intel_display.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu

[PATCH v2 2/5] drm/fourcc: Add tile width and height to drm_format_info

2018-08-21 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 352 +++ include/drm/drm_fourcc.h | 4 + 2 files changed, 281 insertions(+), 75 deletions(-) diff --git a/drivers/gpu/drm/drm_fourcc.c b/drivers/gpu/drm/drm_fourcc.c index 18bb960e9943..f55cd93ba2d0 100644

[PATCH v2 1/5] drm/fourcc: Add new fourcc for malidp uncompressed formats

2018-08-21 Thread Alexandru Gheorghe
Malidp implements a number of yuv buffer formats which are not currently described in drm_fourcc.h. This adds those definitions and describes their memory layout. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 7 +++ include/uapi/drm/drm_fourcc.h | 27

[PATCH v2 0/5] Add Mali DP non-compressed pixel formats

2018-08-21 Thread Alexandru Gheorghe
/2018-July/184597.html [2] https://lists.freedesktop.org/archives/dri-devel/2018-August/186465.html [3] https://lists.freedesktop.org/archives/dri-devel/2018-August/186057.html Alexandru Gheorghe (5): drm/fourcc: Add new fourcc for malidp uncompressed formats drm/fourcc: Add tile width

[PATCH] drm/malidp: Fix writeback in NV12

2018-08-20 Thread Alexandru Gheorghe
, probably we need to think of a way for userspace to be able to program that, but for now I think this is better than not working at all or not advertising NV12 as a supported format for memwrite. Reviewed-by: Liviu Dudau Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_hw.c | 25

[PATCH] drm/malidp: Enable MMU prefetch on Mali-DP650

2018-08-20 Thread Alexandru Gheorghe
if possible. Signed-off-by: Jamie Fox Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_drv.h| 9 ++ drivers/gpu/drm/arm/malidp_hw.c | 17 +- drivers/gpu/drm/arm/malidp_hw.h | 1 + drivers/gpu/drm/arm/malidp_planes.c | 233 drivers/gpu/drm/arm

[PATCH] drm: Clarify DRM_MODE_REFLECT_X/Y documentation

2018-08-10 Thread Alexandru Gheorghe
DRM_MODE_REFLECT_X and DRM_MODE_REFLECT_Y meaning seems a bit unclear to me, so try to clarify that with a bit of ascii graphics. Signed-off-by: Alexandru Gheorghe --- include/uapi/drm/drm_mode.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/include/uapi/drm

[PATCH v3 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vc4/vc4_plane.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b

[PATCH v3 05/10] drm/exynos: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/exynos

[PATCH v3 08/10] drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Maxime Ripard Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/sun4i/sun4i_layer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[PATCH v3 04/10] drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Boris Brezillon Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH v3 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 4a0f0f41afa1..61824e360619 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b

[PATCH v3 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/imx/ipuv3

[PATCH v3 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc) to their default values. Use that instead of duplicating the logic. Reviewed-by: Harry Wentland Signed-off-by: Alexandru Gheorghe

[PATCH v3 00/10] Add helper for plane reset

2018-08-04 Thread Alexandru Gheorghe
default value. Tested with mali-dp the other drivers are just built-tested. Alexandru Gheorghe (10): drm/atomic: Add __drm_atomic_helper_plane_reset drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic drm: mali-dp: Use __drm_atomic_helper_plane_reset

[PATCH v3 03/10] drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_planes.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 29409a65d864..49c37f6dd63e 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c

[PATCH v3 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-08-04 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 6 ++ drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 5 + 2

[PATCH v3 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset

2018-08-04 Thread Alexandru Gheorghe
are the same as the defaults from core. Change since v1: - Make it consistent with the other helpers and require that both plane and state not be NULL, suggested by Boris Brezillon and Philipp Zabel. Reviewed-by: Laurent Pinchart Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm

[PATCH v2 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset

2018-07-26 Thread Alexandru Gheorghe
are the same as the defaults from core. Change since v1: - Make it consistent with the other helpers and require that both plane and state not be NULL, suggested by Boris Brezillon and Philipp Zabel. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic_helper.c | 31

[PATCH v2 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 4a0f0f41afa1..61824e360619 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +++ b

[PATCH v2 05/10] drm/exynos: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/exynos

[PATCH v2 04/10] drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Acked-by: Boris Brezillon Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH v2 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc) to their default values. Use that instead of duplicating the logic. Reviewed-by: Harry Wentland Signed-off-by: Alexandru Gheorghe

[PATCH v2 03/10] drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_planes.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 29409a65d864..49c37f6dd63e 100644 --- a/drivers/gpu/drm/arm/malidp_planes.c

[PATCH v2 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vc4/vc4_plane.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b

[PATCH v2 08/10] drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/sun4i/sun4i_layer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i

[PATCH v2 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
to its max value, which is defined by the drm core as DRM_BLEND_ALPHA_OPAQUE, so nothing changes regarding the alpha value. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +--- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +--- 2 files changed, 2 insertions(+), 6

[PATCH v2 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-26 Thread Alexandru Gheorghe
A new helper function(__drm_atomic_helper_plane_reset) has been added for linking a plane with its state and resetting the core properties(alpha, rotation, etc.) to their default values. Use that instead of duplicating the logic. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/imx/ipuv3

[PATCH v2 00/10] Add helper for plane reset

2018-07-26 Thread Alexandru Gheorghe
built-tested. Alexandru Gheorghe (10): drm/atomic: Add __drm_atomic_helper_plane_reset drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic drm: atmel-hlcdc: Use

[PATCH 2/3] drm: Make drm_gem_fb_alloc available for drivers to use

2018-07-26 Thread Alexandru Gheorghe
Some drivers can't use drm_gem_fb_create, so instead of copying the logic that does the framebuffer allocation allow them to use core drm_gem_fb_alloc. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_gem_framebuffer_helper.c | 3 ++- include/drm/drm_gem_framebuffer_helper.h | 5

[PATCH 1/3] drm/fourcc: Add malidp yuv formats

2018-07-26 Thread Alexandru Gheorghe
Malidp implements a number of yuv buffer formats which are not currently described in drm_fourcc.h. This adds those definitions and describes their memory layout. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_fourcc.c | 7 +++ include/uapi/drm/drm_fourcc.h | 27

[PATCH 3/3] drm: mali-dp: Enable mali specific buffer formats

2018-07-26 Thread Alexandru Gheorghe
: drm_fb_cma_get_gem_addr doesn't properly retrieves start address, so I added the right formula for DRM_FORMAT_X0L0 and DRM_FORMAT_X0L2 inside the driver. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_drv.c| 65 - drivers/gpu/drm/arm/malidp_hw.c | 7

[PATCH 0/3] Add Mali DP pixel formats

2018-07-26 Thread Alexandru Gheorghe
min_size and avoid duplicating the code from drm_gem_fb_create_with_funcs. If you have an opinion about how this should be handled feel free to suggest it. Alexandru Gheorghe (3): drm/fourcc: Add malidp yuv formats drm: Make drm_gem_fb_alloc available for drivers to use drm: mali-dp

[PATCH 10/10] drm/vmwgfx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vmwgfx/vmwgfx_kms.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c b/drivers/gpu/drm/vmwgfx/vmwgfx_kms.c index 466336b34fff..1e0fb3c79b50 100644 --- a/drivers/gpu/drm/vmwgfx

[PATCH 06/10] drm/imx: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/imx/ipuv3-plane.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 203f247d4854..1bd4de03ce9e 100644 --- a/drivers/gpu/drm/imx/ipuv3

[PATCH 08/10] drm/sun4i: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/sun4i/sun4i_layer.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index 750ad24de1d7..78f77af8805a 100644 --- a/drivers/gpu/drm/sun4i

[PATCH 09/10] drm/vc4: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/vc4/vc4_plane.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c index 9d7a36f148cf..688ad9bb0f08 100644 --- a/drivers/gpu/drm/vc4/vc4_plane.c +++ b

[PATCH 07/10] drm: rcar-du: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 4 +--- drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_plane.c b/drivers/gpu/drm/rcar-du/rcar_du_plane.c index

[PATCH 05/10] drm/exynos: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/exynos/exynos_drm_plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_plane.c b/drivers/gpu/drm/exynos/exynos_drm_plane.c index eb9915da7dec..681328fbe7de 100644 --- a/drivers/gpu

[PATCH 03/10] drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_planes.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/arm/malidp_planes.c b/drivers/gpu/drm/arm/malidp_planes.c index 29409a65d864..49c37f6dd63e 100644 --- a/drivers/gpu/drm/arm

[PATCH 01/10] drm/atomic: Add __drm_atomic_helper_plane_reset

2018-07-20 Thread Alexandru Gheorghe
are the same as the defaults from core. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic_helper.c | 32 + include/drm/drm_atomic_helper.h | 2 ++ 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_helper.c

[PATCH 00/10] Add helper for plane reset

2018-07-20 Thread Alexandru Gheorghe
drivers are just built-tested. Alexandru Gheorghe (10): drm/atomic: Add __drm_atomic_helper_plane_reset drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic drm: mali-dp: Use __drm_atomic_helper_plane_reset instead of copying the logic drm: atmel-hlcdc

[PATCH 02/10] drm/amd/display: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c index ca017c1dd4da

[PATCH 04/10] drm: atmel-hlcdc: Use __drm_atomic_helper_plane_reset instead of copying the logic

2018-07-20 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c index 04440064b9b7..9330a076e15a 100644

[PATCH] drm: mali-dp: Call drm_crtc_vblank_reset on device init

2018-07-16 Thread Alexandru Gheorghe
which together with drm_vblank_get have some magic that prevents calling drm_vblank_enable when crtc is off. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/arm/malidp_drv.c b/drivers/gpu/drm/arm

[PATCH v3] drm: mali-dp: Set encoder possible_clones

2018-07-16 Thread Alexandru Gheorghe
Set possible_clones field to report that the writeback connector and the one driving the display could be enabled at the same time. Signed-off-by: Alexandru Gheorghe Changes since v2: - Use proper style for multi-line comments. --- drivers/gpu/drm/arm/malidp_drv.c | 11 +++ 1 file

[PATCH v2 3/3] drm: mali-dp: Set encoder possible_clones

2018-07-13 Thread Alexandru Gheorghe
Set possible_clones field to report that the writeback connector and the one driving the display could be enabled at the same time. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/arm

[PATCH v2 1/3] drm: writeback: Fix doc that says connector should be disconnected

2018-07-13 Thread Alexandru Gheorghe
During iteration process one of the proposed mechanism for not breaking existing userspace was to report writeback connectors as disconnected, however the final version used DRM_CLIENT_CAP_WRITEBACK_CONNECTORS for that purpose. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm

[PATCH v2 2/3] drm: mali-dp: Report writeback connector as connected

2018-07-13 Thread Alexandru Gheorghe
of writeback connector in drm_helper_probe_single_connector_modes, see [1]. https://lists.freedesktop.org/archives/dri-devel/2018-July/183144.html Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_mw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/arm

[PATCH] drm: mali-dp: Set encoder possible_clones

2018-07-12 Thread Alexandru Gheorghe
Set possible_clones field to report that the writeback connector and the one driving the display could be enabled at the same time. Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/arm/malidp_drv.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/arm

[PATCH] drm/probe-helper: Fix modes reporting for writeback connector

2018-07-12 Thread Alexandru Gheorghe
Writeback connector is reported as disconnected, currently this causes the setting of the edid property to null and then exit. In order to properly get the modes for writeback we need to add an exception when connector type is DRM_MODE_CONNECTOR_WRITEBACK. Signed-off-by: Alexandru Gheorghe

[PATCH] drm/atomic: Set current atomic state in drm_private_state

2018-05-30 Thread Alexandru Gheorghe
drm_private_state has a back pointer to the drm_atomic_state, however that was not initialized in drm_atomic_get_private_obj_state after duplication, as it is the case for other drm atomic getters Signed-off-by: Alexandru Gheorghe --- drivers/gpu/drm/drm_atomic.c | 1 + 1 file changed, 1

[PATCH v2] drm: mali-dp: Add debugfs file for reporting internal errors

2018-05-15 Thread Alexandru Gheorghe
] last_error_status : 0x00e23001 [SE] last_error_vblank : 201 Changes since v2: - Add lock to protect the errors stats. - Add possibility to reset the error stats by writing anything to the debug file. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drivers/gpu/d

[PATCH] drm: mali-dp: Add debugfs file for reporting internal errors

2018-05-11 Thread Alexandru Gheorghe
] last_error_status : 0x00e23001 [SE] last_error_vblank : 201 This a morphosis of the patch presented here [1], where the errors where reported continuously via trace_printk. [1] https://lists.freedesktop.org/archives/dri-devel/2018-February/167042.html Signed-off-by: Alexandru Gheorghe <alexan

[PATCH hwc v2 18/18] drm_hwcomposer: Flatten scene asynchronously

2018-04-11 Thread Alexandru Gheorghe
. Commit copy to the unsed crtc and get the result as a writeback_comp. 5. Copy the writeback comp and commit(if needed) to the display. The copying of the writeback comp is needed because the crtc might not be on the same dri node so the buffers will have to be re-imported. Signed-off-by: Alexandru

[PATCH hwc v2 16/18] drm_hwcomposer: Find writeback connector for scene flattening

2018-04-11 Thread Alexandru Gheorghe
(state != DRM_MODE_CONNECTED). What's not handled here and should be handle is what happens if connector changes state while flattening, but since hotplug is not wired yet, it's not something we should worry about. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.

[PATCH hwc v2 17/18] drm_hwcomposer: Flatten scene synchronously

2018-04-11 Thread Alexandru Gheorghe
-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmdisplaycompositor.cpp | 203 +-- drmdisplaycompositor.h | 7 +- 2 files changed, 204 insertions(+), 6 deletions(-) diff --git a/drmdisplaycompositor.cpp b/drmdisplaycompositor.cpp

[PATCH hwc v2 15/18] drm_hwcomposer: Add worker to trigger scene flattenning

2018-04-11 Thread Alexandru Gheorghe
Add a vsync worker that calls back into the DrmDisplayCompositor, for now at every 60 vsyncs if the scene does not change we trigger the flattening of the scene using the writeback connector. Other, more complex and proper heuristics could be implemented later on. Signed-off-by: Alexandru

[PATCH hwc v2 12/18] drm_hwcomposer: Add utility function to create an initialized composition

2018-04-11 Thread Alexandru Gheorghe
There is a lot of boilerplate for creating an initialized drmdisplaycomposition. This patch gathers that in a separate method. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmdisplaycompositor.cpp | 23 +++ drmdisplaycompositor.h | 2

[PATCH hwc v2 14/18] drm_hwcomposer: Fix race in ApplyFrame

2018-04-11 Thread Alexandru Gheorghe
ApplyFrame holds the lock just when it swaps the value of active_composition_, in a multithread context we could end up in a situation where something is shown on the screen, but something else is set in active_composition_. Fix it by holding the lock during CommitFrame. Signed-off-by: Alexandru

[PATCH hwc v2 11/18] drm_hwcomposer: Add utility functions to copy displaycomposition internals

2018-04-11 Thread Alexandru Gheorghe
Add utility functions to copy the DrmHwcLayer and DrmCompositionPlanes from another DrmDisplayComposition. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmdisplaycomposition.cpp | 29 + drmdisplaycomposition.h | 3 +++ 2 files c

[PATCH hwc v2 13/18] drm_hwcomposer: Pass buffer sizes to Prepareframebuffer

2018-04-11 Thread Alexandru Gheorghe
Currently Prepareframebuffer uses the mode of the connected connector to decide how big the buffer should be, however when using the drmdisplaycompositor just for flattening, the mode had not been set yet, so we need a way to pass the desired buffer sizes. Signed-off-by: Alexandru Gheorghe

[PATCH hwc v2 07/18] drm_hwcomposer: Add display field to Drmencoder

2018-04-11 Thread Alexandru Gheorghe
encoder connected to a crtc but with two or more, like is the case when we attach a writeback connector, we need to know if we already assigned the encoder to a display. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmencoder.cpp | 14 ++ drmencoder.h

[PATCH hwc v2 09/18] drm_hwcomposer: Handle writeback connectors

2018-04-11 Thread Alexandru Gheorghe
that's already presented on another display. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmresources.cpp | 62 ++-- drmresources.h | 3 +++ 2 files changed, 63 insertions(+), 2 deletions(-) diff

[PATCH hwc v2 06/18] drm_hwcomposer: Add writeback connector support

2018-04-11 Thread Alexandru Gheorghe
://lists.freedesktop.org/archives/dri-devel/2018-February/167703.html Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmconnector.cpp | 42 +- drmconnector.h | 7 +++ 2 files changed, 48 insertions(+), 1 deletion(-) diff

[PATCH hwc v2 10/18] drm_hwcomposer: hwcutils: Add function for cloning a DrmHwcLayer

2018-04-11 Thread Alexandru Gheorghe
When doing flattening of a composition on a different CRTC we need to be able to clone a layer in order to import it and then pass it to another CRTC. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmhwcomposer.h | 1 + hwcutils.cpp| 11 +++ 2

[PATCH hwc v2 08/18] drm_hwcomposer: Parse and store possible_clones information

2018-04-11 Thread Alexandru Gheorghe
drmModeEncoder has a field called possible_clones. It's a bit mask which tells if the encoder could be simultaneously connected, to the same CRTC, with the encoders specified in the possible_clones mask. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmencod

[PATCH hwc v2 04/18] drm_hwcomposer: Add resource manager class

2018-04-11 Thread Alexandru Gheorghe
: /dev/dri/card% Additionally, this will be used for finding an available writeback connector that will be used for the flattening of the currently displayed scene. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- Android.mk | 1 + resourcemanager.cp

[PATCH hwc v2 05/18] drm_hwcomposer: Enable resource manager support

2018-04-11 Thread Alexandru Gheorghe
Use the newly added ResourceManager for creating and detecting all the drm devices instead of assuming that there is only one device. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmhwctwo.cpp| 34 +- drmhwctwo.h

[PATCH hwc v2 02/18] drm_hwcomposer: vsyncworker: Fix deadlock on exit path

2018-04-11 Thread Alexandru Gheorghe
code paths. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- vsyncworker.cpp | 1 + worker.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vsyncworker.cpp b/vsyncworker.cpp index 3bfe4be..7c0c741 100644 --- a/vsyncworker.cpp

[PATCH hwc v2 03/18] drm_hwcomposer: drmeventlistener: Set nl_pid to 0

2018-04-11 Thread Alexandru Gheorghe
By setting nl_pid to 0, we let the kernel to assign a port for us. In the current implementation there is no way we could create more than one instance for drmeventlistener. Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- drmeventlistener.cpp | 2 +- 1 file chan

[PATCH hwc v2 01/18] drm_hwcomposer: vsyncworker: Fix uninitialized enabled_ field

2018-04-11 Thread Alexandru Gheorghe
Signed-off-by: Alexandru Gheorghe <alexandru-cosmin.gheor...@arm.com> --- vsyncworker.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/vsyncworker.cpp b/vsyncworker.cpp index 3ad16fe..3bfe4be 100644 --- a/vsyncworker.cpp +++ b/vsyncworker.cpp @@ -35,6 +35,7 @@ VSyncWorker::VSync

  1   2   >