[PATCH] drm/imx: imx-ldb: detach existing panels when unbinding the driver

2016-08-12 Thread Liu Ying
We should detach existing panels when unbinding the driver since they are attached at the binding stage, otherwise, the attaching function would return the -EBUSY value when the ldb driver module is installed again. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-ldb.c | 3 +++ 1 file

[PATCH] drm/imx: Remove imx_drm_handle_vblank()

2016-07-29 Thread Liu Ying
imx_drm_handle_vblank() is just a simple wrapper of drm_crtc_handle_vblank() without doing any thing fancy - drm_crtc_handle_vblank() can be called directly. So, let's remove the wrapper. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 6 -- drivers/gpu/drm/imx/imx-drm.h

[PATCH 2/2] drm/imx: Remove imx_drm_crtc_id()

2016-07-18 Thread Liu Ying
There is no one calling imx_drm_crtc_id() and it is just a simple wrapper of drm_crtc_index() without doing any thing fancy - the drivers may call drm_crtc_index() directly. So, let's remove the wrapper. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 6 -- drivers/gpu/drm

[PATCH 1/2] drm/imx: Remove imx_drm_crtc_vblank_get/_put()

2016-07-18 Thread Liu Ying
There is no one calling imx_drm_crtc_vblank_get/_put() and they are just two simple wrappers of drm_crtc_vblank_get/_put() without doing any thing fancy - the drivers may call drm_crtc_vblank_get/_put() directly. So, let's remove the two wrappers. Signed-off-by: Liu Ying --- drivers/gpu/drm

[PATCH v4 10/10] drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMIC

2016-07-08 Thread Liu Ying
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * None. v1->v2: * None. drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/im

[PATCH v4 09/10] drm/imx: atomic phase 3 step 2: Legacy callback fixups

2016-07-08 Thread Liu Ying
mx-tve driver, since the encoder's callback ->dpms is replaced by ->disable, we need to move the setting for the IPU_CLK_EN bit(in register TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the relevant CRTC cannot be disabled correctly with a warning on DC stop timeout

[PATCH v4 08/10] drm/bridge: dw-hdmi: Remove the legacy drm_connector_funcs structure

2016-07-08 Thread Liu Ying
There is no one using the legacy drm_connector_funcs structure since the imx-drm has been converted to atomic, so we may remove it. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * Newly introduced to remove the legacy drm_connector_funcs structure step-by-step. drivers/gpu/drm/

[PATCH v4 07/10] drm/imx: atomic phase 3 step 1: Use atomic configuration

2016-07-08 Thread Liu Ying
remove the private ipu_crtc->enabled state which was left there for the transitional atomic helpers in phase 1. Page flip is also switched to the atomic version. Last, the legacy function drm_helper_disable_unused_functions() is removed from ->load in order not to confuse the atomic driver. Signed

[PATCH v4 06/10] drm/imx: Remove encoders' ->prepare callbacks

2016-07-08 Thread Liu Ying
The main task of imx encoders' ->prepare callbacks is to set bus_format, bus_flags, di_vsync_pin and di_hsync_pin. We may create a structure named imx_encoder to cache them. The atomic encoder callback ->disable may replace ->prepare later, so let's remove ->prepare. Signed-off-

[PATCH v4 05/10] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip

2016-07-08 Thread Liu Ying
Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * None. v1->v2: * None. drivers/gpu/drm/imx/ipuv3-crtc.c | 4 1 file changed, 4 insertions(+) diff --gi

[PATCH v4 04/10] drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy

2016-07-08 Thread Liu Ying
Wire up CRTCs', planes' and connectors' ->reset, ->duplicate and ->destroy state hooks to use the default implementations from the atomic helper library. The helpers track each DRM object state. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * For dw-hdmi bridge dri

[PATCH v4 03/10] drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers

2016-07-08 Thread Liu Ying
ic_update are always successful. Also, some necessary logics are tweaked for a smooth transition. Signed-off-by: Liu Ying --- v3->v4: * Staticize ipu_plane_atomic_set_base(). v2->v3: * A minor change to simplify the way we find crtc->enabled in drm_plane_helper_funcs->atomic_

[PATCH v4 02/10] gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism

2016-07-08 Thread Liu Ying
allocation failure cases then. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * None. v1->v2: * Improve the commit message to better explain why the static allocation mechanism can replace the dynamic one. drivers/gpu/drm/imx/ipuv3-plane.c | 26 - drivers/gpu/ipu-v3/i

[PATCH v4 01/10] drm/imx: ipuv3 plane: Check different types of plane separately

2016-07-08 Thread Liu Ying
The IPUv3 primary plane doesn't support partial off screen. So, this patch separates plane check logics for primary plane and overlay plane and adds more limitations on the primary plane. Signed-off-by: Liu Ying --- v3->v4: * None. v2->v3: * None. v1->v2: * Remove an unneces

[PATCH v4 00/10] imx drm atomic mode setting conversion

2016-07-08 Thread Liu Ying
omic mode settings. This way, a block commit will not overwrite the hardware setting when a nonblock page flip is about to finish, so that the page flip may wait for vblank successfully. * See changelogs in each patch for other trivial updates. Liu Ying (10): drm/imx: ipuv3 plane: Check

[PATCH 0/3] imx drm atomic mode setting fixups

2016-07-08 Thread Liu Ying
ate places (the > mode_set removal could be squashed into the "Legacy callback fixups" > patch, for example). I could then retest and potentially rebase the > remaining changes on your next version. I'll respin to fix the LVDS bus format translation issue. To keep my patch set as

[PATCH v3 10/10] drm/imx: atomic phase 3 step 3: Advertise DRIVER_ATOMIC

2016-07-04 Thread Liu Ying
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying --- v2->v3: * None. v1->v2: * None. drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/d

[PATCH v3 09/10] drm/imx: atomic phase 3 step 2: Legacy callback fixups

2016-07-04 Thread Liu Ying
mx-tve driver, since the encoder's callback ->dpms is replaced by ->disable, we need to move the setting for the IPU_CLK_EN bit(in register TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the relevant CRTC cannot be disabled correctly with a warning on DC stop timeout

[PATCH v3 08/10] drm/bridge: dw-hdmi: Remove the legacy drm_connector_funcs structure

2016-07-04 Thread Liu Ying
There is no one using the legacy drm_connector_funcs structure since the imx-drm has been converted to atomic, so we may remove it. Signed-off-by: Liu Ying --- v2->v3: * Newly introduced to remove the legacy drm_connector_funcs structure step-by-step. drivers/gpu/drm/bridge/dw-hdmi.c |

[PATCH v3 07/10] drm/imx: atomic phase 3 step 1: Use atomic configuration

2016-07-04 Thread Liu Ying
remove the private ipu_crtc->enabled state which was left there for the transitional atomic helpers in phase 1. Page flip is also switched to the atomic version. Last, the legacy function drm_helper_disable_unused_functions() is removed from ->load in order not to confuse the atomic driver. Signed

[PATCH v3 06/10] drm/imx: Remove encoders' ->prepare callbacks

2016-07-04 Thread Liu Ying
The main task of imx encoders' ->prepare callbacks is to set bus_format, bus_flags, di_vsync_pin and di_hsync_pin. We may create a structure named imx_encoder to cache them. The atomic encoder callback ->disable may replace ->prepare later, so let's remove ->prepare. Signed-off-

[PATCH v3 05/10] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip

2016-07-04 Thread Liu Ying
Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying --- v2->v3: * None. v1->v2: * None. drivers/gpu/drm/imx/ipuv3-crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/d

[PATCH v3 04/10] drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy

2016-07-04 Thread Liu Ying
Wire up CRTCs', planes' and connectors' ->reset, ->duplicate and ->destroy state hooks to use the default implementations from the atomic helper library. The helpers track each DRM object state. Signed-off-by: Liu Ying --- v2->v3: * For dw-hdmi bridge driver, simply add the hooks t

[PATCH v3 03/10] drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers

2016-07-04 Thread Liu Ying
ic_update are always successful. Also, some necessary logics are tweaked for a smooth transition. Signed-off-by: Liu Ying --- v2->v3: * A minor change to simplify the way we find crtc->enabled in drm_plane_helper_funcs->atomic_check. v1->v2: * Get the overlay ipu plane resou

[PATCH v3 02/10] gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism

2016-07-04 Thread Liu Ying
allocation failure cases then. Signed-off-by: Liu Ying --- v2->v3: * None. v1->v2: * Improve the commit message to better explain why the static allocation mechanism can replace the dynamic one. drivers/gpu/drm/imx/ipuv3-plane.c | 26 - drivers/gpu/ipu-v3/ipu-dmfc.c

[PATCH v3 01/10] drm/imx: ipuv3 plane: Check different types of plane separately

2016-07-04 Thread Liu Ying
The IPUv3 primary plane doesn't support partial off screen. So, this patch separates plane check logics for primary plane and overlay plane and adds more limitations on the primary plane. Signed-off-by: Liu Ying --- v2->v3: * None. v1->v2: * Remove an unnecessary copy to address Phi

[PATCH v3 00/10] imx drm atomic mode setting conversion

2016-07-04 Thread Liu Ying
ttings. This way, a block commit will not overwrite the hardware setting when a nonblock page flip is about to finish, so that the page flip may wait for vblank successfully. * See changelogs in each patch for other trivial updates. Liu Ying (10): drm/imx: ipuv3 plane: Check different

[PATCH v2 10/10] drm/imx: atomic phase 3 step 5: Advertise DRIVER_ATOMIC

2016-05-31 Thread Liu Ying
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying --- v1->v2: * None. drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-

[PATCH v2 09/10] drm/imx: atomic phase 3 step 4: Use generic atomic page flip

2016-05-31 Thread Liu Ying
To support generic atomic page flip, this patch customizes ->atomic_commit for nonblock commits. Signed-off-by: Liu Ying --- v1->v2: * s/async/nonblock/ on this patch to address Daniel Vetter's comment. * Wait for pending commit on each CRTC for both block and nonblock atomic mode se

[PATCH v2 08/10] drm/imx: atomic phase 3 step 3: Legacy callback fixups

2016-05-31 Thread Liu Ying
mx-tve driver, since the encoder's callback ->dpms is replaced by ->disable, we need to move the setting for the IPU_CLK_EN bit(in register TVE_COM_CONF_REG) from ->enable/->disable to ->mode_set, otherwise, the relevant CRTC cannot be disabled correctly with a warning on DC stop timeout

[PATCH v2 07/10] drm/imx: atomic phase 3 step 2: Use atomic configuration

2016-05-31 Thread Liu Ying
ved from ->load in order not to confuse the atomic driver. Signed-off-by: Liu Ying --- v1->v2: * Handle the newly introduced bus_flags via imx_encoder after the rebasing. * Remove the legacy function drm_helper_disable_unused_functions() from ->load in order not to confuse the atomic drive

[PATCH v2 06/10] drm/imx: atomic phase 3 step 1: Atomic updates for planes

2016-05-31 Thread Liu Ying
This patch switches the update/disable_plane callbacks to their atomic version. Also, use the default atomic helpers to implement the atomic_check/commit callbacks for mode configuration. Signed-off-by: Liu Ying --- v1->v2: * None. drivers/gpu/drm/imx/imx-drm-core.c | 3 +++ drivers/gpu/

[PATCH v2 05/10] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip

2016-05-31 Thread Liu Ying
Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying --- v1->v2: * None. drivers/gpu/drm/imx/ipuv3-crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/dr

[PATCH v2 04/10] drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy

2016-05-31 Thread Liu Ying
Wire up CRTCs', planes' and connectors' ->reset, ->duplicate and ->destroy state hooks to use the default implementations from the atomic helper library. The helpers track each DRM object state. Signed-off-by: Liu Ying --- v1->v2: * Remove the 'atomic' from the name of t

[PATCH v2 03/10] drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers

2016-05-31 Thread Liu Ying
ic_update are always successful. Also, some necessary logics are tweaked for a smooth transition. Signed-off-by: Liu Ying --- v1->v2: * Get the overlay ipu plane resource when initializing the relevant CRTC and do not get ipu plane resource any more when updating plane to avoid resource alloca

[PATCH v2 02/10] gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism

2016-05-31 Thread Liu Ying
allocation failure cases then. Signed-off-by: Liu Ying --- v1->v2: * Improve the commit message to better explain why the static allocation mechanism can replace the dynamic one. drivers/gpu/drm/imx/ipuv3-plane.c | 26 - drivers/gpu/ipu-v3/ipu-dmfc.c |

[PATCH v2 01/10] drm/imx: ipuv3 plane: Check different types of plane separately

2016-05-31 Thread Liu Ying
The IPUv3 primary plane doesn't support partial off screen. So, this patch separates plane check logics for primary plane and overlay plane and adds more limitations on the primary plane. Signed-off-by: Liu Ying --- v1->v2: * Remove an unnecessary copy to address Philipp's comment. drivers/

[PATCH v2 00/10] imx drm atomic mode setting conversion

2016-05-31 Thread Liu Ying
mit will not overwrite the hardware setting when a nonblock page flip is about to finish, so that the page flip may wait for vblank successfully. * See changelogs in each patch for other trivial updates. Liu Ying (10): drm/imx: ipuv3 plane: Check different types of plane separately gpu: ipu-v3: ipu-dmfc:

[PATCH] drm: Improve kerneldoc for mode_fixup callbacks and encoder's ->atomic_check

2016-05-30 Thread Liu Ying
To match with the atomic context, this patch updates kerneldoc to clarify that all mode_fixup callbacks and encoder's ->atomic_check callback are called only when enabling a display mode on the relevant CRTC. Suggested-by: Daniel Vetter Signed-off-by: Liu Ying --- include/drm/drm_crt

[PATCH] drm/atomic-helper: Do not call ->mode_fixup for CRTC which will be disabled

2016-05-27 Thread Liu Ying
ted. So, let's don't call the callback for the CRTC. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_atomic_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index ddfa0d1..939df90 100644 --- a/drivers/gpu/

[PATCH 14/14] drm/imx: atomic phase 3 step 5: Advertise DRIVER_ATOMIC

2016-05-24 Thread Liu Ying
With all the beforehand phases and steps done, we can adverstise DRIVER_ATOMIC. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/imx-drm-core.c b/drivers/gpu/drm/imx/imx-drm-core.c index

[PATCH 13/14] drm/imx: atomic phase 3 step 4: Use generic atomic page flip

2016-05-24 Thread Liu Ying
To support generic atomic page flip, this patch customizes ->atomic_commit for async commits. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 137 +++- drivers/gpu/drm/imx/ipuv3-crtc.c | 156 ++--- 2 files chan

[PATCH 12/14] drm/imx: atomic phase 3 step 3: Legacy callback fixups

2016-05-24 Thread Liu Ying
Now that we can use atomic configurations, all the legacy callbacks of CRTCs, encoders and connectors can be switched to the atomic version. For the imx-ldb driver, there is a clock parent setting mismatch bewteen ->enable and ->disable after the switch, so a fixup is added. Signed-off-b

[PATCH 11/14] drm/imx: atomic phase 3 step 2: Use atomic configuration

2016-05-24 Thread Liu Ying
plement CRTC/plane atomic checks by using the new CRTC/plane states instead of the legacy ones and we may remove the private ipu_crtc->enabled state which was left there for the transitional atomic helpers in phase 1. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/dw_hdmi-imx.c | 18 +++---

[PATCH 10/14] drm/atomic-helper: Disable planes when suspending

2016-05-24 Thread Liu Ying
We should disable planes explicitly when suspending. Especially, this is meaningful for those display controllers which don't support active planes without relevant CRTCs being enabled. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_atomic_helper.c | 18 +- 1 file changed, 17

[PATCH 09/14] drm/imx: atomic phase 3 step 1: Atomic updates for planes

2016-05-24 Thread Liu Ying
This patch switches the update/disable_plane callbacks to their atomic version. Also, use the default atomic helpers to implement the atomic_check/commit callbacks for mode configuration. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 3 +++ drivers/gpu/drm/imx/ipuv3-plane.c

[PATCH 08/14] drm/imx: atomic phase 2 step 2: Track plane_state->fb correctly in ->page_flip

2016-05-24 Thread Liu Ying
Use drm_atomic_set_fb_for_plane() in the legacy ->page_flip path to track the pointer plane_state->fb correctly. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/imx/ipuv3-crtc.c b/drivers/gpu/drm/imx

[PATCH 07/14] drm/imx: atomic phase 2 step 1: Wire up state ->reset, ->duplicate and ->destroy

2016-05-24 Thread Liu Ying
Wire up CRTCs', planes' and connectors' ->reset, ->duplicate and ->destroy state hooks to use the default implementations from the atomic helper library. The helpers track each DRM object state. Signed-off-by: Liu Ying --- drivers/gpu/drm/bridge/dw-hdmi.c | 19 +++

[PATCH 06/14] drm/imx: atomic phase 1: Use transitional atomic CRTC and plane helpers

2016-05-24 Thread Liu Ying
ic_update are always successful. Also, some necessary logics are tweaked for a smooth transition. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-crtc.c | 173 +++-- drivers/gpu/drm/imx/ipuv3-plane.c | 516 +++--- drivers/gpu/drm/imx/ipuv3-plan

[PATCH 05/14] drm/crtc_helper: Disable and reenable primary plane in drm_helper_crtc_mode_set

2016-05-24 Thread Liu Ying
ed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc_helper.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 79555d2..7fabcd7 100644 --- a/drivers/gpu/drm/drm_crtc_helper.c +++ b/drivers/gpu/drm/drm_crtc_helper.c @@ -

[PATCH 04/14] gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism

2016-05-24 Thread Liu Ying
setting as we don't need to handle allocation failure cases then. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 26 - drivers/gpu/ipu-v3/ipu-dmfc.c | 213 ++ include/video/imx-ipu-v3.h| 3 - 3 files changed, 7 insertions

[PATCH 03/14] drm: imx: ipuv3 plane: Check different types of plane separately

2016-05-24 Thread Liu Ying
The IPUv3 primary plane doesn't support partial off screen. So, this patch separates plane check logics for primary plane and overlay plane and adds more limitations on the primary plane. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 72

[PATCH 02/14] drm/imx: plane: Don't set plane->crtc in ipu_plane_update()

2016-05-24 Thread Liu Ying
Since the drm core sets plane->crtc correctly, we don't need to do that. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 157032d..e6ec8eb 100

[PATCH 01/14] drm/imx: ipuv3-plane: Constify ipu_plane_funcs

2016-05-24 Thread Liu Ying
Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers/gpu/drm/imx/ipuv3-plane.c index 681ec6e..157032d 100644 --- a/drivers/gpu/drm/imx/ipuv3-plane.c +++ b/drivers/gpu/drm/imx

[PATCH 00/14] imx drm atomic mode setting conversion

2016-05-24 Thread Liu Ying
Hi, This patch set converts imx drm into atomic mode setting. It takes 3 phases to achieve the goal as recommended. This patch set may apply to Philipp Zabel's open git branch imx-drm/fixes. Liu Ying (14): drm/imx: ipuv3-plane: Constify ipu_plane_funcs drm/imx: plane: Don't set plane->c

[PATCH] drm/crtc_helper: Reset empty plane state in drm_helper_crtc_mode_set_base()

2016-04-05 Thread Liu Ying
ing for other transitional helpers, but it seems this one was missed. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc_helper.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c index 79555d2..6

[PATCH 4/4] drm/imx: ipuv3-plane: Configure DMFC wait4eot bit after slots are determined

2016-03-14 Thread Liu Ying
on overlay plane with small resolutions. To reproduce the issue, we may run this drm modetest case - 'modetest -P 19:64x64'. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/imx/ipuv3-plane.c b/drivers

[PATCH 3/4] gpu: ipu-v3: ipu-dmfc: Rename ipu_dmfc_init_channel to ipu_dmfc_config_wait4eot

2016-03-14 Thread Liu Ying
The function name 'ipu_dmfc_config_wait4eot' matches the implementation of the function better than 'ipu_dmfc_init_channel', since it only touches the wait4eot bits. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 2 +- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 ++-- include/video

[PATCH 2/4] gpu: ipu-v3: ipu-dmfc: Make function ipu_dmfc_init_channel() return void

2016-03-14 Thread Liu Ying
Since the function ipu_dmfc_init_channel() always returns zero, we may change the return type to void to simplify the code. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-plane.c | 6 +- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 +--- include/video/imx-ipu-v3.h| 2 +- 3 files

[PATCH 1/4] gpu: ipu-v3: ipu-dmfc: Protect function ipu_dmfc_init_channel() with mutex

2016-03-14 Thread Liu Ying
logic in upper layer. Signed-off-by: Liu Ying --- drivers/gpu/ipu-v3/ipu-dmfc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/ipu-v3/ipu-dmfc.c b/drivers/gpu/ipu-v3/ipu-dmfc.c index 042c395..129ccfa 100644 --- a/drivers/gpu/ipu-v3/ipu-dmfc.c +++ b/drivers/gpu/ipu-v3/ipu-

[PATCH] drm/crtc: Use drm_mode_object_put() in __drm_framebuffer_unregister()

2016-02-29 Thread Liu Ying
The function __drm_framebuffer_unregister() has boilerplate code to drop idr reference. Let's replace it with drm_mode_object_put() to simplify the code. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu

[PATCH 5/5] drm/imx: ipuv3 plane: Replace dev_info with dev_dbg if a plane's CRTC changes

2016-01-22 Thread Liu Ying
Hi Philipp, 2015-11-23 19:48 GMT+08:00 Philipp Zabel : > Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying: >> This patch changes the dev_info() call to dev_dbg() in ipu_plane_update() >> to print out the information that a plane's CRTC is changed, because this >>

[PATCH] drm/atomic-helper: Remove redundant local var old_crtc_state in disable_outputs

2016-01-18 Thread Liu Ying
One of the two local variables old_crtc_state is redundantly defined in the function disable_outputs(). It has only a scope partway through the block for_each_connector_in_state. So, let's remove it and use the one which has the scope within the function disable_outputs(). Signed-off-by: Liu

[PATCH 2/2] drm/crtc_helper/set_config: Remove redundant NULL pointer check on set->mode

2016-01-14 Thread Liu Ying
We've done sanity NULL pointer check on set->mode at the beginning of drm_crtc_helper_set_config() and bailed out if necessary, thus any later on check is redundant. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PATCH 1/2] drm/crtc_helper/set_config: Remove redundant handling when set->fb is NULL

2016-01-14 Thread Liu Ying
We've done sanity NULL pointer check on set->fb at the beginning of drm_crtc_helper_set_config() and bailed out if necessary, thus any later on check or case handling is redundant. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_crtc_helper.c | 2 -- 1 file changed, 2 deletions(-) diff --

[PATCH 4/5] drm/imx: ipuv3 plane: Use the helper ipu_plane_cleanup() in ipu_plane_destroy()

2015-11-24 Thread Liu Ying
On Mon, Nov 23, 2015 at 12:48:12PM +0100, Philipp Zabel wrote: > Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying: > > To reduce code duplication, we can use the helper ipu_plane_cleanup() in > > ipu_plane_destroy(). > > > > Signed-off-by: Liu Ying >

[PATCH 3/5] drm/imx: ipuv3 crtc: Cleanup ipu planes in ipu_drm_unbind()

2015-11-24 Thread Liu Ying
On Mon, Nov 23, 2015 at 12:48:14PM +0100, Philipp Zabel wrote: > Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying: > > To avoid memory leakage, we need to cleanup ipu planes in ipu_drm_unbind(). > > > > Signed-off-by: Liu Ying > > --- > > This patch ap

[PATCH 1/5] drm/imx: ipuv3 plane: Introduce ipu_plane_cleanup()

2015-11-24 Thread Liu Ying
On Mon, Nov 23, 2015 at 12:48:13PM +0100, Philipp Zabel wrote: > Am Freitag, den 20.11.2015, 16:14 +0800 schrieb Liu Ying: > > This patch adds a helper ipu_plane_cleanup() to cleanup a IPU plane. > > It can be used in the bailout path of ipu_crtc_init(), for instance. > > &

[PATCH 5/5] drm/imx: ipuv3 plane: Replace dev_info with dev_dbg if a plane's CRTC changes

2015-11-20 Thread Liu Ying
This patch changes the dev_info() call to dev_dbg() in ipu_plane_update() to print out the information that a plane's CRTC is changed, because this kind of information is only useful for debugging. Signed-off-by: Liu Ying --- This patch applies to the imx-drm/fixes branch of Philipp Zabel's open

[PATCH 4/5] drm/imx: ipuv3 plane: Use the helper ipu_plane_cleanup() in ipu_plane_destroy()

2015-11-20 Thread Liu Ying
To reduce code duplication, we can use the helper ipu_plane_cleanup() in ipu_plane_destroy(). Signed-off-by: Liu Ying --- This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git. drivers/gpu/drm/imx/ipuv3-plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH 3/5] drm/imx: ipuv3 crtc: Cleanup ipu planes in ipu_drm_unbind()

2015-11-20 Thread Liu Ying
To avoid memory leakage, we need to cleanup ipu planes in ipu_drm_unbind(). Signed-off-by: Liu Ying --- This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git. drivers/gpu/drm/imx/ipuv3-crtc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/imx

[PATCH 2/5] drm/imx: ipuv3 crtc: Cleanup ipu planes in ipu_crtc_init() when necessary

2015-11-20 Thread Liu Ying
To avoid memory leakage, we need to cleanup the initialized ipu planes in the bailout path of ipu_crtc_init(). Signed-off-by: Liu Ying --- This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git. drivers/gpu/drm/imx/ipuv3-crtc.c | 7 ++- 1 file changed, 6 insertions

[PATCH 1/5] drm/imx: ipuv3 plane: Introduce ipu_plane_cleanup()

2015-11-20 Thread Liu Ying
This patch adds a helper ipu_plane_cleanup() to cleanup a IPU plane. It can be used in the bailout path of ipu_crtc_init(), for instance. Signed-off-by: Liu Ying --- This patch applies to the imx-drm/fixes branch of Philipp Zabel's open git. drivers/gpu/drm/imx/ipuv3-plane.c | 6

[PATCH 2/2] drm/imx: Remove the primary plane created by create_primary_plane()

2015-11-17 Thread Liu Ying
On Mon, Nov 16, 2015 at 05:00:21PM +0100, Daniel Vetter wrote: > On Wed, Nov 04, 2015 at 06:15:58PM +0800, Liu Ying wrote: > > Since we are using ipu_plane_init() to add one primary plane for each > > IPU CRTC, it's unnecessary to create the safe one by using the helper > >

[PATCH v2] drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane

2015-11-06 Thread Liu Ying
For primary plane initialization failure cases, ipu_plane_init() may return a pointer encoded by ERR_PTR(). So, we should bailout instead of using that pointer blindly. Signed-off-by: Liu Ying --- v1->v2: * Trivial commit message fix. * Rebase onto Phillip's patch[1]. [1] h

[PATCH] drm/imx: switch to universal planes

2015-11-06 Thread Liu Ying
h removes the safe plane which is created by create_primary_plane(). Or, at least, it fixes the NULL pointer dereference issue triggered by the drm modetest I mentioned in my patch[1]. Otherwise, Acked-by: Liu Ying [1] https://lkml.org/lkml/2015/11/4/107 Regards, Liu Ying > > Signed-

[PATCH 2/2] drm/imx: Remove the primary plane created by create_primary_plane()

2015-11-06 Thread Liu Ying
On Fri, Nov 06, 2015 at 11:05:48AM +0100, Philipp Zabel wrote: > Am Mittwoch, den 04.11.2015, 18:15 +0800 schrieb Liu Ying: > > Since we are using ipu_plane_init() to add one primary plane for each > > IPU CRTC, it's unnecessary to create the safe one by using the helper > >

[PATCH 1/2] drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane

2015-11-06 Thread Liu Ying
On Fri, Nov 06, 2015 at 11:05:54AM +0100, Philipp Zabel wrote: > Hi Liu, > > Am Mittwoch, den 04.11.2015, 18:15 +0800 schrieb Liu Ying: > > For primary plane initialization failure cases, ipu_plane_init() may return > > a pointer encoded by ERR_PTR(). So, we should b

[PATCH 2/2] drm/imx: Remove the primary plane created by create_primary_plane()

2015-11-04 Thread Liu Ying
e plane created by ipu_plane_init() with crtc->primary and removes the safe one to address this issue. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- drivers/gpu/drm/imx/ipuv3-crtc.c | 6 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/

[PATCH 1/2] drm/imx: ipuv3-crtc: Return error if ipu_plane_init() fails for primary plane

2015-11-04 Thread Liu Ying
For primary plane initialization failure cases, ipu_plane_init() may return a pointer encoded by ERR_PTR(). So, we should bailout instead of use that pointer blindly. Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/ipuv3-crtc.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu

[PATCH v9.5.1 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

2015-05-14 Thread Liu Ying
the conversion from a specific MIPI DSI pixel format to it's bits per pixel value. Signed-off-by: Liu Ying --- v9.5->v9.5.1: * To address Thierry Reding's comments, add a commit message to describe why the helper is useful and when to use it and fix typo in kernel-doc from 'mipi dsi' to 'MIPI

[PATCH RFC v9.5 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

2015-05-14 Thread Liu Ying
2015-05-12 21:36 GMT+08:00 Thierry Reding : > On Fri, Feb 13, 2015 at 01:25:19PM +0800, Liu Ying wrote: >> Signed-off-by: Liu Ying > > This could use a commit message. Describe for example why this is useful > or when to use it. Ok, I'll add it in the next version. &g

[PATCH RFC v9 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

2015-04-03 Thread Liu Ying
Hi Thierry, 2015-03-03 19:07 GMT+08:00 Philipp Zabel : > Hi, > > Am Donnerstag, den 12.02.2015, 14:01 +0800 schrieb Liu Ying: >> Signed-off-by: Liu Ying >> --- >> v8->v9: >> * Rebase onto the imx-drm/next branch of Philipp Zabel's open git >> reposit

[PATCH] DRM: i.MX: parallel display: Support probe deferral for finding DRM panel

2015-02-23 Thread Liu Ying
Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/parallel-display.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/imx/parallel-display.c b/drivers/gpu/drm/imx/parallel-display.c index 5e83e00..900dda6 100644 --- a/drivers/gpu/drm/imx/parallel-display.c

[PATCH RFC v9.5 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

2015-02-13 Thread Liu Ying
Signed-off-by: Liu Ying --- v9->v9.5: * Add kernel-doc for the new helper function to address Daniel Vetter's comment. v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * Address the over 80 ch

[PATCH RFC v9 09/20] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format

2015-02-13 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:26:42AM +0100, Daniel Vetter wrote: > On Thu, Feb 12, 2015 at 02:01:32PM +0800, Liu Ying wrote: > > Signed-off-by: Liu Ying > > --- > > v8->v9: > > * Rebase onto the imx-drm/next branch of Philipp Zabel's open git > > repo

[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-13 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:06:27PM +0800, Liu Ying wrote: > On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: > > On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: > > > On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > >

[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 02:41:31PM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 12:56:46PM +, Russell King - ARM Linux wrote: > > On Thu, Feb 12, 2015 at 01:24:05PM +0100, Sascha Hauer wrote: > > > On Thu, Feb 12, 2015 at 06:39:45PM +0800, Liu Ying wrote: > >

[PATCH RFC v9 01/20] clk: divider: Correct parent clk round rate if no bestdiv is normally found

2015-02-12 Thread Liu Ying
On Thu, Feb 12, 2015 at 10:33:56AM +0100, Sascha Hauer wrote: > On Thu, Feb 12, 2015 at 02:01:24PM +0800, Liu Ying wrote: > > If no best divider is normally found, we will try to use the maximum > > divider. > > We should not set the parent clock rate to be 1Hz by force f

[PATCH RFC v9 20/20] ARM: imx_v6_v7_defconfig: Add support for Himax HX8369A panel

2015-02-12 Thread Liu Ying
/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: * Add the HIMAX pr

[PATCH RFC v9 19/20] ARM: imx_v6_v7_defconfig: Add support for MIPI DSI host controller

2015-02-12 Thread Liu Ying
/configs/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * None. v3->v4: * None. v2->v3: * None. v1->v2: *

[PATCH RFC v9 18/20] ARM: imx_v6_v7_defconfig: Cleanup for imx drm being moved out of staging

2015-02-12 Thread Liu Ying
The new imx_v6_v7_defconfig is generated in this way: * make ARCH=arm imx_v6_v7_defconfig * make ARCH=arm savedefconfig * cp defconfig arch/arm/configs/imx_v6_v7_defconfig Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository,

[PATCH RFC v9 17/20] ARM: dts: imx6qdl-sabresd: Add support for TRULY TFT480800-16-E MIPI DSI panel

2015-02-12 Thread Liu Ying
The TRULY TFT480800-16-E panel is driven by the Himax HX8369A driver IC. The driver IC supports several display/control interface modes, including the MIPI DSI video mode and command mode. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open

[PATCH RFC v9 16/20] ARM: dtsi: imx6qdl: Add support for MIPI DSI host controller

2015-02-12 Thread Liu Ying
This patch adds support for MIPI DSI host controller. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible string "snps,dw-mipi-dsi" shoul

[PATCH RFC v9 15/20] drm: panel: Add support for Himax HX8369A MIPI DSI panel

2015-02-12 Thread Liu Ying
This patch adds support for Himax HX8369A MIPI DSI panel. Reviewed-by: Andrzej Hajda Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * Add driver copyright for 2015. v7->v8: * Remove several unnecessary headers in

[PATCH RFC v9 14/20] Documentation: dt-bindings: Add bindings for Himax HX8369A DRM panel driver

2015-02-12 Thread Liu Ying
This patch adds device tree bindings for Himax HX8369A DRM panel driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. v7->v8: * None. v6->v7: * None. v5->v6: * None. v4->v5: * Merge the bs[3:0]-g

[PATCH RFC v9 13/20] drm: imx: Support Synopsys DesignWare MIPI DSI host controller

2015-02-12 Thread Liu Ying
This patch adds support for Synopsys DesignWare MIPI DSI host controller which is embedded in the i.MX6q/sdl SoCs. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * Add driver copyright for 2015. v7->v8: * None.

[PATCH RFC v9 12/20] Documentation: dt-bindings: Add bindings for i.MX specific Synopsys DW MIPI DSI driver

2015-02-12 Thread Liu Ying
This patch adds device tree bindings for i.MX specific Synopsys DW MIPI DSI driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible string "snps,dw-

[PATCH RFC v9 11/20] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver

2015-02-12 Thread Liu Ying
This patch adds Synopsys DesignWare MIPI DSI host controller driver support. Currently, the driver supports the burst with sync pulses mode only. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository and adapt to bridge API cha

[PATCH RFC v9 10/20] Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver

2015-02-12 Thread Liu Ying
This patch adds device tree bindings for Synopsys DesignWare MIPI DSI host controller DRM bridge driver. Signed-off-by: Liu Ying --- v8->v9: * Rebase onto the imx-drm/next branch of Philipp Zabel's open git repository. * To address Philipp's comment, mention that a common compatible str

<    3   4   5   6   7   8   9   10   11   >