[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

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

2016-05-27 Thread Liu Ying
e be rejected. 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 10064

[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/dr

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

2016-05-31 Thread Liu Ying
ck 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 types of plane separately gpu: ipu

[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.

[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

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

2016-05-31 Thread Liu Ying
pdate 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 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 07/10] drm/imx: atomic phase 3 step 2: Use atomic configuration

2016-05-31 Thread Liu Ying
moved 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

[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 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 ti

[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 mo

[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 02/10] gpu: ipu-v3: ipu-dmfc: Use static DMFC FIFO allocation mechanism

2016-05-31 Thread Liu Ying
to handle 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-dmf

[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/driver

[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 RESEND v2 1/2] drm/bridge: dw-hdmi: Don't cleanup i2c adapter and ddc ptr in __dw_hdmi_probe() bailout path

2020-07-09 Thread Liu Ying
trong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu

[PATCH RESEND v2 2/2] drm/bridge: dw-hdmi: Always add the bridge in the global bridge list

2020-07-09 Thread Liu Ying
vid Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: Sam Ravnborg Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu Ying --- v1->v2: * Put drm_bridge_add() in __dw_hd

[PATCH RESEND] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()

2020-07-09 Thread Liu Ying
er Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-ldb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 4da22a9..af4d0d8 100644 --- a/drivers/g

Re: [PATCH RESEND v2 2/2] drm/bridge: dw-hdmi: Always add the bridge in the global bridge list

2020-07-14 Thread Liu Ying
On Fri, 2020-07-10 at 19:32 +0200, Sam Ravnborg wrote: > On Thu, Jul 09, 2020 at 10:02:36AM +0800, Liu Ying wrote: > > It doesn't hurt to add the bridge in the global bridge list also > > for > > platform specific dw-hdmi drivers which are based on the component &

[PATCH] drm/imx: imx-ldb: Remove the leftover LVDS_BIT_MAP_SPWG/JEIDA enums

2020-05-13 Thread Liu Ying
ascha Hauer Cc: Pengutronix Kernel Team Cc: NXP Linux Team Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-ldb.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 4da22a9..19a00eb 100644 --- a/drivers/gpu/drm/imx/imx-ldb.

[PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()

2020-05-13 Thread Liu Ying
er Cc: Pengutronix Kernel Team Cc: NXP Linux Team Cc: Signed-off-by: Liu Ying --- drivers/gpu/drm/imx/imx-ldb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 4da22a9..af4d0d8 100644 --- a/drivers/g

[PATCH 1/2] drm/bridge: dw-hdmi: Don't cleanup i2c adapter and ddc ptr in __dw_hdmi_probe() bailout path

2020-06-17 Thread Liu Ying
trong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu

[PATCH 2/2] drm/bridge: dw-hdmi: Always add the bridge in the global bridge list

2020-06-17 Thread Liu Ying
hiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu Ying --- Laurent, I may see the uninitialized mutex accessing issue with i.MX dw-hdmi after applying your below patch set[1]. I think patch '[22/27] d

Re: [PATCH 00/27] Converter R-Car DU to the DRM bridge connector helper

2020-06-25 Thread Liu Ying
ith the VGA, HDMI > > and > > LVDS outputs. > > > > [1] > > https://lore.kernel.org/dri-devel/20200409004610.12346-1-laurent.pinchart+rene...@ideasonboard.com/ > > [2] > > https://lore.kernel.org/dri-devel/20200409003636.11792-1-laurent.pinchart+rene...@i

Re: [PATCH 2/2] drm/bridge: dw-hdmi: Always add the bridge in the global bridge list

2020-06-28 Thread Liu Ying
Hi Laurent, On Sun, 2020-06-28 at 11:22 +0300, Laurent Pinchart wrote: > Hi Liu, > > (CC'ing Sam) > > Thank you for the patch. Thanks for your review. > > On Tue, Jun 16, 2020 at 05:04:52PM +0800, Liu Ying wrote: > > It doesn't hurt to add the bridge i

[PATCH v2 1/2] drm/bridge: dw-hdmi: Don't cleanup i2c adapter and ddc ptr in __dw_hdmi_probe() bailout path

2020-06-30 Thread Liu Ying
trong Cc: Laurent Pinchart Cc: Jonas Karlman Cc: Jernej Skrabec Cc: David Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu

[PATCH v2 2/2] drm/bridge: dw-hdmi: Always add the bridge in the global bridge list

2020-06-30 Thread Liu Ying
vid Airlie Cc: Daniel Vetter Cc: Boris Brezillon Cc: Jerome Brunet Cc: Cheng-Yi Chiang Cc: Dariusz Marcinkiewicz Cc: Archit Taneja Cc: Jose Abreu Cc: Sam Ravnborg Cc: dri-devel@lists.freedesktop.org Cc: NXP Linux Team Signed-off-by: Liu Ying --- v1->v2: * Put drm_bridge_add() in __dw_hd

Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()

2020-05-28 Thread Liu Ying
Gentle ping... On Tue, 2020-05-12 at 15:31 +0800, Liu Ying wrote: > Both of the two LVDS channels should be disabled for split mode > in the encoder's ->disable() callback, because they are enabled > in the encoder's ->enable() callback. > > Fixes: 6556f7f82b9c

Re: [PATCH] drm/imx: imx-ldb: Remove the leftover LVDS_BIT_MAP_SPWG/JEIDA enums

2020-05-28 Thread Liu Ying
Gentle ping... On Tue, 2020-05-12 at 15:21 +0800, Liu Ying wrote: > No one is using the LVDS_BIT_MAP_SPWG/JEIDA enums since a previous > commit which changes the imx_ldb_bit_mappings[] array definition, > so let's remove them. > > Fixes: 5e501ed7253b ("drm/imx: imx-ld

Re: [PATCH] drm/imx: imx-ldb: Remove the leftover LVDS_BIT_MAP_SPWG/JEIDA enums

2020-05-28 Thread Liu Ying
does the same thing as this patch does. I'm fine to drop this patch then. Regarding Philipp's proposal on the use-after-free issue, we've got the basically the same implemetation in downstream ldb driver to address the issue. Regards, Liu Ying > > [1] > https://eur0

Re: [PATCH] drm/imx: imx-ldb: Disable both channels for split mode in enc->disable()

2020-05-28 Thread Liu Ying
Hi Marco, On Thu, 2020-05-28 at 11:31 +0200, Marco Felsch wrote: > Hi Liu > > On 20-05-28 10:58, Liu Ying wrote: > > Gentle ping... > > Please check my "spring cleanup series" [1] which do the split: It looks that your series doesn't disable both lvds

[PATCH 1/2] dt-bindings: panel-simple: Add koe, tx26d202vm0bwa compatible

2020-06-02 Thread Liu Ying
Add compatible to panel-simple for Kaohsiung Opto-Electronics Inc. 10.1" WUXGA(1920x1200) TX26D202VM0BWA TFT LCD panel with LVDS interface. Cc: Thierry Reding Cc: Sam Ravnborg Cc: Rob Herring Signed-off-by: Liu Ying --- Documentation/devicetree/bindings/display/panel/panel-simple.yam

[PATCH 0/2] drm/panel: simple: Add a KOE WUXGA 10.1" LVDS panel support

2020-06-02 Thread Liu Ying
t different. It looks that the two types of panel are compatible with each other. http://www.koe.j-display.com/upload/product/TX26D202VM0BAA.pdf Patch 1/2 adds compatible for the panel in the panel-simple DT binding doc. Patch 2/2 adds the panel support in the DRM panel-simple driver. Liu Ying (2

[PATCH 2/2] drm/panel: simple: Add support for KOE TX26D202VM0BWA panel

2020-06-02 Thread Liu Ying
'TX26D202VM0BAA' is a little bit different. It looks that the two types of panel are compatible with each other. http://www.koe.j-display.com/upload/product/TX26D202VM0BAA.pdf Cc: Thierry Reding Cc: Sam Ravnborg Signed-off-by: Liu Ying --- drivers/gpu

[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

[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
ife easier to do 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-do

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

2015-11-04 Thread Liu Ying
tch binds the 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/d

[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 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 bailou

[PATCH] drm/imx: switch to universal planes

2015-11-06 Thread Liu Ying
patch 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 > > Si

[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].

[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

[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 v3 00/10] imx drm atomic mode setting conversion

2016-07-04 Thread Liu Ying
nonblock atomic 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

[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 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 addres

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

2016-07-04 Thread Liu Ying
pdate 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 resource

[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. S

[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 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

[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 ti

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

2016-07-04 Thread Liu Ying
to handle 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-

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

2016-07-04 Thread Liu Ying
ve 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 0/3] imx drm atomic mode setting fixups

2016-07-08 Thread Liu Ying
of my changes in the appropriate 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 translatio

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

2016-07-08 Thread Liu Ying
r both block and nonblock atomic 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):

[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 unnec

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

2016-07-08 Thread Liu Ying
to handle 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/gp

[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 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. S

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

2016-07-08 Thread Liu Ying
pdate 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_chec

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

2016-07-08 Thread Liu Ying
ve 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 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 ti

[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 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

[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/gp

[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/gp

[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-

[PATCH] drm/fb-helper: Return correct type to match drm_fb_helper_debug_enter() prototype

2014-06-19 Thread Liu Ying
The return type of drm_fb_helper_debug_enter() is int, so we should return '0' instead of 'false'. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_fb_helper.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu

[PATCH] drm/fb-helper: Redundant info->fix.type_aux setting in drm_fb_helper_fill_fix()

2014-06-19 Thread Liu Ying
The variable info->fix.type_aux is set to zero twice in the function drm_fb_helper_fill_fix(). This patch removes one redundant. Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_fb_helper.c |1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/

[PATCH] drm/fb-helper: Return correct type to match drm_fb_helper_debug_enter() prototype

2014-06-19 Thread Liu Ying
On 06/19/2014 03:01 PM, Daniel Vetter wrote: > On Thu, Jun 19, 2014 at 10:50:31AM +0800, Liu Ying wrote: >> The return type of drm_fb_helper_debug_enter() is int, so we should return >> '0' >> instead of 'false'. >> >> Signed-off-by: Liu Yin

[PATCH] drm/fb-helper: Remove unnecessary list empty check in drm_fb_helper_debug_enter()

2014-06-19 Thread Liu Ying
necessary check in drm_fb_helper_debug_enter(). Signed-off-by: Liu Ying --- drivers/gpu/drm/drm_fb_helper.c |3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index d5d8cea..eb77a2f 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++

[PATCH 0/3] refactor some ldb related clocks

2013-08-20 Thread Liu Ying
changes to fullfill the task. Liu Ying (3): ARM: imx6q: refactor some ldb related clocks ARM: dts: imx6q/imx6dl: add necessary clocks for ldb node staging: drm/imx: ldb: correct the ldb di clock trees .../devicetree/bindings/clock/imx6q-clock.txt |6 ++-- arch/arm/boot/dts

[PATCH 1/3] ARM: imx6q: refactor some ldb related clocks

2013-08-20 Thread Liu Ying
ldb_di[0/1]_div_sel multiplexers so that the fixed factor clocks of 1/3.5 and 1/7 can be set to be the parents of ldb_di[0/1]_div_sel multiplexers. The ldb_di[0/1]_podf dividers are no longer used then. Signed-off-by: Liu Ying --- .../devicetree/bindings/clock/imx6q-clock.txt |6

[PATCH 3/3] staging: drm/imx: ldb: correct the ldb di clock trees

2013-08-20 Thread Liu Ying
de as well. Signed-off-by: Liu Ying --- drivers/staging/imx-drm/imx-ldb.c | 38 + 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 8af7f3b..7c553b8 100644 --- a/dr

[PATCH 2/3] ARM: dts: imx6q/imx6dl: add necessary clocks for ldb node

2013-08-20 Thread Liu Ying
This patch adds di[0/1]_div_3_5, di[0/1]_div_7 and di[0/1]_div_sel clocks to the ldb nodes so that the ldb driver may use them to setup the display clock trees. Signed-off-by: Liu Ying --- arch/arm/boot/dts/imx6dl.dtsi |8 ++-- arch/arm/boot/dts/imx6q.dtsi |8 ++-- 2 files

Re: [PATCH 0/3] refactor some ldb related clocks

2013-08-20 Thread Liu Ying
On 08/20/2013 05:43 PM, Philipp Zabel wrote: > Am Dienstag, den 20.08.2013, 16:38 +0800 schrieb Liu Ying: >> The ldb_di[0/1]_ipu_div clock dividers in the CSCMR2 register >> of i.MX53, i.MX6Q and i.MX6DL SoCs can be configured to a 1/3.5 >> drivider or a 1/7 divider. The c

Re: [PATCH 0/3] refactor some ldb related clocks

2013-08-20 Thread Liu Ying
On 08/21/2013 09:59 AM, Shawn Guo wrote: > Hi Ying, > > On Tue, Aug 20, 2013 at 06:08:48PM +0800, Liu Ying wrote: >>> While I admit to having introduced the combination of 1/3.5 fixed >>> divider and configurable 1/1,1/2 divder clocks to describe this >>> fr

Re: [PATCH 1/3] ARM: imx6q: refactor some ldb related clocks

2013-08-20 Thread Liu Ying
On 08/20/2013 11:40 PM, Fabio Estevam wrote: > On Tue, Aug 20, 2013 at 5:38 AM, Liu Ying wrote: > >> diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt >> b/Documentation/devicetree/bindings/clock/imx6q-clock.txt >> index 5a90a72..90e923e 10064

[PATCH v4 0/7] drm/imx: Add active plane reconfiguration support

2016-08-26 Thread Liu Ying
>atomic_disable callback, but not in each plane's ->atomic_update callback, as suggested by Daniel Vetter. * +Cc Lucas Stach, as he tested the patch v2. v1->v2: * Do not reject reconfiguring an active overlay plane. Liu Ying (7): drm/atomic-helper: Add atomic_disable CRTC helper c

[PATCH v4 1/7] drm/atomic-helper: Add atomic_disable CRTC helper callback

2016-08-26 Thread Liu Ying
state for disable operation. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v3->v4: * Improve kernel-doc of CRTC's atomic_disable callback to address Daniel Vetter's comment.

[PATCH v4 5/7] drm/imx: ipuv3-crtc: Use the callback ->atomic_disable instead of ->disable

2016-08-26 Thread Liu Ying
Now that the drm atomic core supports the callback ->atomic_disable, we may replace the legacy one ->disable with it. Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Daniel Vetter Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v3->v4: * None. v3

[PATCH v4 6/7] drm/imx: Use DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag

2016-08-26 Thread Liu Ying
irlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v4: * Newly introduced in v4, but some logic is picked from patch 3/3 in v3. drivers/gpu/drm/imx/imx-drm-core.c | 3 ++- drivers/gpu/drm/imx/ipuv3-crtc.c | 3 +++ drivers/gpu/drm/imx/ipuv3-plane.c

[PATCH v4 3/7] drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commit

2016-08-26 Thread Liu Ying
ter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v4: * Newly introduced in v4. drivers/gpu/drm/arm/malidp_drv.c | 3 +- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 46 driv

[PATCH v4 7/7] drm/imx: Add active plane reconfiguration support

2016-08-26 Thread Liu Ying
;atomic_check callback so that the CRTC will be disabled before the plane configuration. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v4: * Newly introduced in v4, but the logic is picked

[PATCH v4 2/7] drm/atomic-helper: Disable appropriate planes in disable_planes_on_crtc()

2016-08-26 Thread Liu Ying
lanes of old_crtc_state in the helper. Suggested-by: Daniel Vetter Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- v4: * Newly introduced in v4. drivers/gpu/drm/drm_atomic_helper.c | 16 +--- inc

[PATCH v4 4/7] gpu: ipu-v3: Do not wait for DMFC FIFO to clear when disabling DMFC channel

2016-08-26 Thread Liu Ying
dd the new DRM_PLANE_COMMIT_NO_DISABLE_AFTER_MODESET flag to the imx-drm driver which changes the procedure to disable display channel slightly. Cc: Philipp Zabel Cc: David Airlie Cc: Russell King Cc: Peter Senna Tschudin Cc: Lucas Stach Cc: Daniel Vetter Signed-off-by: Liu Ying --- v4: * Newly introd

[PATCH v2] drm/atomic-helper: Add NO_DISABLE_AFTER_MODESET flag support for plane commit

2016-08-29 Thread Liu Ying
ter Senna Tschudin Cc: Lucas Stach Signed-off-by: Liu Ying --- I choose to pick this patch from the patch set[1] so that I may address Daniel Vetter's comments conveniently by sending v2 for it alone. [1] http://www.spinics.net/lists/dri-devel/msg116491.html v1->v2: * Add a new

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

2016-04-05 Thread Liu Ying
me thing 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 79555

[PATCH 0/3] refactor some ldb related clocks

2013-08-20 Thread Liu Ying
changes to fullfill the task. Liu Ying (3): ARM: imx6q: refactor some ldb related clocks ARM: dts: imx6q/imx6dl: add necessary clocks for ldb node staging: drm/imx: ldb: correct the ldb di clock trees .../devicetree/bindings/clock/imx6q-clock.txt |6 ++-- arch/arm/boot/dts

[PATCH 1/3] ARM: imx6q: refactor some ldb related clocks

2013-08-20 Thread Liu Ying
ldb_di[0/1]_div_sel multiplexers so that the fixed factor clocks of 1/3.5 and 1/7 can be set to be the parents of ldb_di[0/1]_div_sel multiplexers. The ldb_di[0/1]_podf dividers are no longer used then. Signed-off-by: Liu Ying --- .../devicetree/bindings/clock/imx6q-clock.txt |6

[PATCH 2/3] ARM: dts: imx6q/imx6dl: add necessary clocks for ldb node

2013-08-20 Thread Liu Ying
This patch adds di[0/1]_div_3_5, di[0/1]_div_7 and di[0/1]_div_sel clocks to the ldb nodes so that the ldb driver may use them to setup the display clock trees. Signed-off-by: Liu Ying --- arch/arm/boot/dts/imx6dl.dtsi |8 ++-- arch/arm/boot/dts/imx6q.dtsi |8 ++-- 2 files

[PATCH 3/3] staging: drm/imx: ldb: correct the ldb di clock trees

2013-08-20 Thread Liu Ying
de as well. Signed-off-by: Liu Ying --- drivers/staging/imx-drm/imx-ldb.c | 38 + 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 8af7f3b..7c553b8 100644 --- a/dr

[PATCH 0/3] refactor some ldb related clocks

2013-08-20 Thread Liu Ying
On 08/20/2013 05:43 PM, Philipp Zabel wrote: > Am Dienstag, den 20.08.2013, 16:38 +0800 schrieb Liu Ying: >> The ldb_di[0/1]_ipu_div clock dividers in the CSCMR2 register >> of i.MX53, i.MX6Q and i.MX6DL SoCs can be configured to a 1/3.5 >> drivider or a 1/7 divider. The c

[PATCH 0/3] refactor some ldb related clocks

2013-08-21 Thread Liu Ying
On 08/21/2013 09:59 AM, Shawn Guo wrote: > Hi Ying, > > On Tue, Aug 20, 2013 at 06:08:48PM +0800, Liu Ying wrote: >>> While I admit to having introduced the combination of 1/3.5 fixed >>> divider and configurable 1/1,1/2 divder clocks to describe this >>> fr

[PATCH 1/3] ARM: imx6q: refactor some ldb related clocks

2013-08-21 Thread Liu Ying
On 08/20/2013 11:40 PM, Fabio Estevam wrote: > On Tue, Aug 20, 2013 at 5:38 AM, Liu Ying wrote: > >> diff --git a/Documentation/devicetree/bindings/clock/imx6q-clock.txt >> b/Documentation/devicetree/bindings/clock/imx6q-clock.txt >> index 5a90a72..90e923e 10064

<    2   3   4   5   6   7   8   9   10   11   >