[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-03 Thread Mark Zhang
Oh.. understood. Thanks. Mark On 07/03/2015 04:03 PM, Daniel Vetter wrote: > On Fri, Jul 03, 2015 at 03:57:55PM +0800, Mark Zhang wrote: >> On 07/01/2015 10:55 PM, Daniel Vetter wrote: >>> On Wed, Jul 01, 2015 at 08:43:01PM +0800, Mark Zhang wrote: >>>> On 07/01/2015

[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-03 Thread Mark Zhang
On 07/01/2015 10:55 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 08:43:01PM +0800, Mark Zhang wrote: >> On 07/01/2015 06:34 PM, Daniel Vetter wrote: [...] >>> >> >> Alright, this makes sense. I have no idea about qxl, what I have now is >> an ubuntu runnin

[PATCH v2 01/12] drm: panel: Add a new private mode flag: DRM_PANEL_FLAG_PREFER_ONE_SHOT

2015-07-01 Thread Mark Zhang
On 07/01/2015 04:54 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 04:21:44PM +0800, Mark Zhang wrote: >> Normally this flag is set by panel driver so that crtc can enable >> the "one-shot" mode(not scan frames continuously). >> >> Signed-off-by: Mark Zhan

[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-01 Thread Mark Zhang
On 07/01/2015 04:46 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 10:36:17AM +0200, Daniel Vetter wrote: >> On Wed, Jul 01, 2015 at 04:21:55PM +0800, Mark Zhang wrote: >>> This HACK adds a workqueue to refresh the display periodically. >>> This is used just

[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-01 Thread Mark Zhang
On 07/01/2015 06:34 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 05:01:52PM +0800, Mark Zhang wrote: >> On 07/01/2015 04:36 PM, Daniel Vetter wrote: >>> On Wed, Jul 01, 2015 at 04:21:55PM +0800, Mark Zhang wrote: >>>> This HACK adds a workqueue to re

[PATCH v2 08/12] drm: dsi: Add "enter idle" & "exit idle" dcs functions

2015-07-01 Thread Mark Zhang
Oh, yes, if so we need to change most of the functions in drm_mipi_dsi.c. Mark On 07/01/2015 05:08 PM, Varka Bhadram wrote: > On 07/01/2015 01:51 PM, Mark Zhang wrote: >> Signed-off-by: Mark Zhang >> --- >> drivers/gpu/drm/drm_mipi_dsi.c | 36

[PATCH v2 10/12] drm/tegra: Suspend dc/dsi/panel in one-shot mode

2015-07-01 Thread Mark Zhang
On 07/01/2015 05:00 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 04:21:53PM +0800, Mark Zhang wrote: >> @@ -756,7 +752,11 @@ tegra_dsi_connector_duplicate_state(struct >> drm_connector *connector) >> } >> >> static const struct drm_connecto

[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-01 Thread Mark Zhang
On 07/01/2015 04:36 PM, Daniel Vetter wrote: > On Wed, Jul 01, 2015 at 04:21:55PM +0800, Mark Zhang wrote: >> This HACK adds a workqueue to refresh the display periodically. >> This is used just for testing. > > ->dirty is the drm hook you're looking for, it's meant to flu

[PATCH v2 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-07-01 Thread Mark Zhang
This HACK adds a workqueue to refresh the display periodically. This is used just for testing. Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 37 + drivers/gpu/drm/tegra/drm.h |1 + 2 files changed, 38 insertions(+) diff --git a/drivers

[PATCH v2 11/12] drm/tegra: dsi: Set connector DPMS state when enable/disable

2015-07-01 Thread Mark Zhang
This patch fixes a bug when drm_helper_connector_dpms tries to switch connector/encoder/crtc DPMS status. Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dsi.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c index

[PATCH v2 10/12] drm/tegra: Suspend dc/dsi/panel in one-shot mode

2015-07-01 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 58 + drivers/gpu/drm/tegra/drm.h |3 ++ drivers/gpu/drm/tegra/dsi.c | 76 --- 3 files changed, 132 insertions(+), 5 deletions(-) diff --git a/drivers/gpu

[PATCH v2 09/12] drm: panel: Add idle/busy in Sharp lq101r1sx01 driver

2015-07-01 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 26 +++ 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index e32f1449b067..64eb437ee7b3 100644

[PATCH v2 08/12] drm: dsi: Add "enter idle" & "exit idle" dcs functions

2015-07-01 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/drm_mipi_dsi.c | 36 include/drm/drm_mipi_dsi.h |2 ++ 2 files changed, 38 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 2d5ca8eec13a..9bc6ff75eb8f

[PATCH v2 07/12] drm/panel: Add panel func: idle/busy

2015-07-01 Thread Mark Zhang
The "idle" function of a drm panel is used to tell panel there are no more frames coming in and it should remain the last frame it gets. Normally this only makes sense for smart panels which has internal framebuffer. The "busy" function is opposite to "idle&quo

[PATCH v2 06/12] drm/tegra: Set NC(Non-contiguous) mode to dc for one-shot

2015-07-01 Thread Mark Zhang
If dc is about to work in one-shot mode, we need to set dc's scan mode to NC(Non-contiguous). There are 2 things which can make dc send frame again: - TE signal is received - Driver sets the NC_HOST_TRIG_ENABLE Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 33

[PATCH v2 05/12] drm: panel: Set TE polarity flag in Sharp lq101r1sx01 driver

2015-07-01 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index fd04c419190c..e32f1449b067 100644

[PATCH v2 04/12] drm: panel: Add DRM panel private mode flag: TE polarity

2015-07-01 Thread Mark Zhang
Add 2 DRM panel private mode flag: TE polarity high/low. Signed-off-by: Mark Zhang --- include/drm/drm_panel.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 4d51cb380c75..e53f48aa070f 100644 --- a/include/drm/drm_panel.h +++ b

[PATCH v2 03/12] drm: panel: Turn on TE(Tearing Effect) on Sharp lq101r1sx01

2015-07-01 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index da2cf7ab64c2..fd04c419190c 100644 --- a/drivers/gpu

[PATCH v2 02/12] drm: panel: Add one-shot flag to Sharp lq101r1sx01 driver

2015-07-01 Thread Mark Zhang
Sharp lq101r1sx01 has internal framebuffer so it doesn't require crtc sending frames to it continuously. Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b

[PATCH v2 01/12] drm: panel: Add a new private mode flag: DRM_PANEL_FLAG_PREFER_ONE_SHOT

2015-07-01 Thread Mark Zhang
Normally this flag is set by panel driver so that crtc can enable the "one-shot" mode(not scan frames continuously). Signed-off-by: Mark Zhang --- include/drm/drm_panel.h |2 ++ 1 file changed, 2 insertions(+) diff --git a/include/drm/drm_panel.h b/include/drm/drm_pan

[PATCH v2 00/12] Tegra: Add DC one-shot support

2015-07-01 Thread Mark Zhang
I idle before suspend - Fix a bug in DSI driver to correct the DPMS state(patch #11) Mark Zhang (12): drm: panel: Add a new private mode flag: DRM_PANEL_FLAG_PREFER_ONE_SHOT drm: panel: Add one-shot flag to Sharp lq101r1sx01 driver drm: panel: Turn on TE(Tearing Effect) on Sharp lq101r1sx01

[RFC PATCH 01/12] drm: Add a new mode flag: DRM_MODE_FLAG_PREFER_ONE_SHOT

2015-05-11 Thread Mark Zhang
to do the changes. Mark From: Daniel Vetter on behalf of Daniel Vetter <dan...@ffwll.ch> Sent: Monday, May 11, 2015 5:27 PM To: Mark Zhang Cc: thierry.reding at gmail.com; linux-tegra at vger.kernel.org; dri-devel at lists.freedesktop.org Subject: Re

[RFC PATCH 12/12] JUST FOR TEST: Add one-shot trigger to update display

2015-05-11 Thread Mark Zhang
This HACK adds a workqueue to refresh the display periodically. This is used just for testing. Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 47 + drivers/gpu/drm/tegra/drm.h | 1 + 2 files changed, 48 insertions(+) diff --git

[RFC PATCH 11/12] drm/tegra: Suspend dc/dsi/panel in one-shot mode

2015-05-11 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 34 drivers/gpu/drm/tegra/drm.h | 3 +++ drivers/gpu/drm/tegra/dsi.c | 63 + 3 files changed, 95 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tegra

[RFC PATCH 10/12] drm: panel: Add idle/busy in Sharp lq101r1sx01 driver

2015-05-11 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 26 + 1 file changed, 26 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 654575607864..a0a7c80f23d6 100644

[RFC PATCH 09/12] drm: dsi: Add "enter idle" & "exit idle" dcs functions

2015-05-11 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/drm_mipi_dsi.c | 36 include/drm/drm_mipi_dsi.h | 2 ++ 2 files changed, 38 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index 2d5ca8eec13a..9bc6ff75eb8f 100644

[RFC PATCH 08/12] drm/panel: Add panel func: idle/busy

2015-05-11 Thread Mark Zhang
The "idle" function of a drm panel is used to tell panel there are no more frames coming in and it should remain the last frame it gets. Normally this only makes sense for smart panels which has internal framebuffer. The "busy" function is opposite to "idle&quo

[RFC PATCH 07/12] drm/tegra: Set NC(Non-contiguous) mode to dc for one-shot

2015-05-11 Thread Mark Zhang
If dc is about to work in one-shot mode, we need to set dc's scan mode to NC(Non-contiguous). There are 2 things which can make dc send frame again: - TE signal is received - Driver sets the NC_HOST_TRIG_ENABLE Signed-off-by: Mark Zhang --- drivers/gpu/drm/tegra/dc.c | 43

[RFC PATCH 06/12] drm: panel: Parse "te-polarity" in Sharp lq101r1sx01 driver

2015-05-11 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index b69f88cd15b2..654575607864

[RFC PATCH 05/12] dt: panel: Add property "te-polarity"

2015-05-11 Thread Mark Zhang
te-polarity indicates the polarity of panel's TE(Tearing Effect) signal. Normally the TE pin is connected to the host SoC. The display controller will send a new frame to panel when the TE signal is triggered. Signed-off-by: Mark Zhang --- Documentation/devicetree/bindings/panel/sharp

[RFC PATCH 04/12] drm: Add DRM mode flag TE polarity

2015-05-11 Thread Mark Zhang
Add 2 DRM mode flag: TE polarity high/low. Signed-off-by: Mark Zhang --- include/uapi/drm/drm_mode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 5447a338e893..b577cdfb76df 100644 --- a/include/uapi/drm/drm_mode.h +++ b

[RFC PATCH 03/12] drm: panel: Turn on TE(Tearing Effect) on Sharp lq101r1sx01

2015-05-11 Thread Mark Zhang
Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c b/drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c index 19a67d2598c0..b69f88cd15b2 100644 --- a/drivers/gpu

[RFC PATCH 02/12] drm: panel: Add one-shot flag to Sharp lq101r1sx01 driver

2015-05-11 Thread Mark Zhang
Sharp lq101r1sx01 has internal framebuffer so it doesn't require crtc sending frames to it continuously. So set the one-shot flag in the driver. Signed-off-by: Mark Zhang --- drivers/gpu/drm/panel/panel-sharp-lq101r1sx01.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm

[RFC PATCH 01/12] drm: Add a new mode flag: DRM_MODE_FLAG_PREFER_ONE_SHOT

2015-05-11 Thread Mark Zhang
Normally this flag is set by panel driver so that crtc can enable the "one-shot" mode(not scan frames continuously). Signed-off-by: Mark Zhang --- include/uapi/drm/drm_mode.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mo

[RFC PATCH 00/12] Tegra: Add DC one-shot support

2015-05-11 Thread Mark Zhang
as a GPIO since not every display controller has a dedicate TE pin like Tegra. So I will try to create v2 after some comments are received. Please be noticed that the patch #12 is not part of the feature, it's just used for testing. Mark Zhang (12): drm: Add a new mode flag: DRM_MODE_FLAG_PREFE

[PATCH 5/5] drm/tegra: Add minimal power management

2015-01-06 Thread Mark Zhang
I mean: Reviewed-by: Mark Zhang To make display suspend/resume working, we need some other patches. I will send out the patches soon, based on this patch set. Thanks Thierry. Mark On 01/05/2015 10:50 PM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Tue, Dec 23, 2014

[PATCH 4/5] gpu: host1x: Provide a proper struct bus_type

2015-01-06 Thread Mark Zhang
Thanks for the explanation. Reviewed-by: Mark Zhang Mark On 01/05/2015 10:49 PM, Thierry Reding wrote: > * PGP Signed by an unknown key > > On Tue, Dec 23, 2014 at 03:30:20PM +0800, Mark Zhang wrote: >> On 12/19/2014 11:24 PM, Thierry Reding wrote: >>> From: Thierry Re

[PATCH 5/5] drm/tegra: Add minimal power management

2014-12-23 Thread Mark Zhang
+1 Mark On 12/19/2014 11:24 PM, Thierry Reding wrote: > From: Thierry Reding > > For now only disable the KMS hotplug polling helper logic upon suspend > and re-enable it on resume. > > Signed-off-by: Thierry Reding > --- > drivers/gpu/drm/tegra/drm.c | 25 + > 1 file

[PATCH 4/5] gpu: host1x: Provide a proper struct bus_type

2014-12-23 Thread Mark Zhang
On 12/19/2014 11:24 PM, Thierry Reding wrote: > From: Thierry Reding > > Previously the struct bus_type exported by the host1x infrastructure was > only a very basic skeleton. Turn that implementation into a more full- > fledged bus to support proper probe ordering and power management. > >

[PATCH] drm/tegra: dsi: Add suspend/resume support

2014-12-10 Thread Mark Zhang
On 12/10/2014 03:29 AM, Sean Paul wrote: > On Sun, Dec 7, 2014 at 10:40 PM, Mark Zhang wrote: >> This patch adds the suspend/resume support for Tegra drm >> driver by calling the corresponding DPMS functions. [...] >> + if (dsi->slave) { >> + err

[PATCH] drm/tegra: dsi: Add suspend/resume support

2014-12-08 Thread Mark Zhang
This patch adds the suspend/resume support for Tegra drm driver by calling the corresponding DPMS functions. Signed-off-by: Mark Zhang --- Hi, This patch hooks DSI driver's suspend/resume to implement the whole display system's suspend/resume. I know this is a super ugly way, but as we all know

[PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 04:40 PM, Mark Zhang wrote: > On 02/18/2013 03:20 PM, Thierry Reding wrote: [...] >> > > Actually the dc which connects with LVDS doesn't know about 1080p > stuffs. All the video mode infos stored in this dc is still 1366x768(I > just checked the register

[PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 03:20 PM, Thierry Reding wrote: > On Mon, Feb 18, 2013 at 03:06:10PM +0800, Mark Zhang wrote: >> On 02/18/2013 02:48 PM, Thierry Reding wrote: >>> On Mon, Feb 18, 2013 at 02:17:53PM +0800, Mark Zhang wrote: >>>> On 02/14/2013 12:05 AM, Thierry Re

[PATCH v3 0/7] drm/tegra: Miscellaneous enhancements

2013-02-18 Thread Mark Zhang
Hi Thierry, Which version is this patch set based on? I tried to apply it on linux-next 0206 & tot 0215 but failed: Applying: drm: Add consistency check for page-flipping Applying: drm/tegra: Add plane support error: patch failed: drivers/gpu/drm/tegra/drm.h:121 error:

[PATCH v3 2/7] drm/tegra: Add plane support

2013-02-18 Thread Mark Zhang
On 02/18/2013 03:01 PM, Thierry Reding wrote: > On Mon, Feb 18, 2013 at 02:55:04PM +0800, Mark Zhang wrote: >> On 02/18/2013 02:40 PM, Thierry Reding wrote: >>> On Mon, Feb 18, 2013 at 02:06:56PM +0800, Mark Zhang wrote: >>>> On 02/14/2013 12:05 AM, Thierry R

[PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 02:48 PM, Thierry Reding wrote: > On Mon, Feb 18, 2013 at 02:17:53PM +0800, Mark Zhang wrote: >> On 02/14/2013 12:05 AM, Thierry Reding wrote: >>> The sequence for replacing the scanout buffer is much shorter than a >>> full mode change operation so

[PATCH v3 2/7] drm/tegra: Add plane support

2013-02-18 Thread Mark Zhang
On 02/18/2013 02:40 PM, Thierry Reding wrote: > On Mon, Feb 18, 2013 at 02:06:56PM +0800, Mark Zhang wrote: >> On 02/14/2013 12:05 AM, Thierry Reding wrote: >>> Add support for the B and C planes which support RGB and YUV pixel >>> formats and can be used as overlays or

[PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 02:17 PM, Mark Zhang wrote: > On 02/14/2013 12:05 AM, Thierry Reding wrote: >> The sequence for replacing the scanout buffer is much shorter than a >> full mode change operation so implementing this callback considerably >> speeds up cases where o

[PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/14/2013 12:05 AM, Thierry Reding wrote: > The sequence for replacing the scanout buffer is much shorter than a > full mode change operation so implementing this callback considerably > speeds up cases where only a new framebuffer is to be scanned out. > > Signed-off-by: Thierry Reding >

[PATCH v3 2/7] drm/tegra: Add plane support

2013-02-18 Thread Mark Zhang
On 02/14/2013 12:05 AM, Thierry Reding wrote: > Add support for the B and C planes which support RGB and YUV pixel > formats and can be used as overlays or hardware cursor. Currently > only 32-bit RGBA pixel formats are advertised. > > Signed-off-by: Thierry Reding [...] > +static int

Re: [PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 03:20 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 03:06:10PM +0800, Mark Zhang wrote: On 02/18/2013 02:48 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 02:17:53PM +0800, Mark Zhang wrote: On 02/14/2013 12:05 AM, Thierry Reding wrote: The sequence for replacing

Re: [PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-18 Thread Mark Zhang
On 02/18/2013 04:40 PM, Mark Zhang wrote: On 02/18/2013 03:20 PM, Thierry Reding wrote: [...] Actually the dc which connects with LVDS doesn't know about 1080p stuffs. All the video mode infos stored in this dc is still 1366x768(I just checked the register values on my Tegra 30 cardhu

Re: [PATCH v3 2/7] drm/tegra: Add plane support

2013-02-17 Thread Mark Zhang
On 02/14/2013 12:05 AM, Thierry Reding wrote: Add support for the B and C planes which support RGB and YUV pixel formats and can be used as overlays or hardware cursor. Currently only 32-bit RGBA pixel formats are advertised. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de

Re: [PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-17 Thread Mark Zhang
On 02/14/2013 12:05 AM, Thierry Reding wrote: The sequence for replacing the scanout buffer is much shorter than a full mode change operation so implementing this callback considerably speeds up cases where only a new framebuffer is to be scanned out. Signed-off-by: Thierry Reding

Re: [PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-17 Thread Mark Zhang
On 02/18/2013 02:17 PM, Mark Zhang wrote: On 02/14/2013 12:05 AM, Thierry Reding wrote: The sequence for replacing the scanout buffer is much shorter than a full mode change operation so implementing this callback considerably speeds up cases where only a new framebuffer is to be scanned out

Re: [PATCH v3 2/7] drm/tegra: Add plane support

2013-02-17 Thread Mark Zhang
On 02/18/2013 02:40 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 02:06:56PM +0800, Mark Zhang wrote: On 02/14/2013 12:05 AM, Thierry Reding wrote: Add support for the B and C planes which support RGB and YUV pixel formats and can be used as overlays or hardware cursor. Currently only 32

Re: [PATCH v3 3/7] drm/tegra: Implement .mode_set_base()

2013-02-17 Thread Mark Zhang
On 02/18/2013 02:48 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 02:17:53PM +0800, Mark Zhang wrote: On 02/14/2013 12:05 AM, Thierry Reding wrote: The sequence for replacing the scanout buffer is much shorter than a full mode change operation so implementing this callback considerably

Re: [PATCH v3 2/7] drm/tegra: Add plane support

2013-02-17 Thread Mark Zhang
On 02/18/2013 03:01 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 02:55:04PM +0800, Mark Zhang wrote: On 02/18/2013 02:40 PM, Thierry Reding wrote: On Mon, Feb 18, 2013 at 02:06:56PM +0800, Mark Zhang wrote: On 02/14/2013 12:05 AM, Thierry Reding wrote: Add support for the B and C planes

[PATCH 4/5] drm/tegra: Implement VBLANK support

2013-01-23 Thread Mark Zhang
On 01/23/2013 02:21 AM, Jon Mayo wrote: > On Mon, Jan 14, 2013 at 7:55 AM, Thierry Reding > wrote: >> Implement support for the VBLANK IOCTL. Note that Tegra is somewhat >> special in this case because it doesn't use the generic IRQ support >> provided by the DRM core (DRIVER_HAVE_IRQ) but rather

Re: [PATCH 4/5] drm/tegra: Implement VBLANK support

2013-01-23 Thread Mark Zhang
On 01/23/2013 02:21 AM, Jon Mayo wrote: On Mon, Jan 14, 2013 at 7:55 AM, Thierry Reding thierry.red...@avionic-design.de wrote: Implement support for the VBLANK IOCTL. Note that Tegra is somewhat special in this case because it doesn't use the generic IRQ support provided by the DRM core

[PATCH] man: Fix typo and use $() for make expressions

2013-01-20 Thread Mark Zhang
Thanks, David. After "sudo apt-get install docbook-xsl" and configure the libdrm with "--enable-manpages", I see the manpages generated. Mark On 01/20/2013 05:17 PM, David Herrmann wrote: > Hi Mark > > On Sun, Jan 20, 2013 at 7:39 AM, Mark Zhang wrote: >>

[PATCH] man: Fix typo and use $() for make expressions

2013-01-20 Thread Mark Zhang
Hi David: Sorry for jumping in. I pulled the ToT libdrm and it seems the manpages will not be built("make html" does nothing), any suggestions? P.S: I've installed xsltproc. Mark On 01/19/2013 12:01 AM, David Herrmann wrote: > On Fri, Jan 18, 2013 at 5:00 PM, David Herrmann > wrote: >> Hi

Re: [PATCH] man: Fix typo and use $() for make expressions

2013-01-20 Thread Mark Zhang
Thanks, David. After sudo apt-get install docbook-xsl and configure the libdrm with --enable-manpages, I see the manpages generated. Mark On 01/20/2013 05:17 PM, David Herrmann wrote: Hi Mark On Sun, Jan 20, 2013 at 7:39 AM, Mark Zhang nvmarkzh...@gmail.com wrote: Hi David: Sorry

Re: [PATCH] man: Fix typo and use $() for make expressions

2013-01-19 Thread Mark Zhang
Hi David: Sorry for jumping in. I pulled the ToT libdrm and it seems the manpages will not be built(make html does nothing), any suggestions? P.S: I've installed xsltproc. Mark On 01/19/2013 12:01 AM, David Herrmann wrote: On Fri, Jan 18, 2013 at 5:00 PM, David Herrmann

[PATCH v2 2/5] drm/tegra: Add plane support

2013-01-18 Thread Mark Zhang
On 01/15/2013 06:50 PM, Lucas Stach wrote: > Am Dienstag, den 15.01.2013, 17:53 +0800 schrieb Mark Zhang: >> On 01/15/2013 12:05 AM, Thierry Reding wrote: >>> Add support for the B and C planes which support RGB and YUV pixel >>> formats and can be used as overlays

[PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-17 Thread Mark Zhang
On 01/15/2013 12:06 AM, Thierry Reding wrote: > All the necessary support bits like .mode_set_base() and VBLANK are now > available, so page-flipping case easily be implemented on top. > > Signed-off-by: Thierry Reding [...] > + > +static int tegra_dc_page_flip(struct drm_crtc *crtc, struct

[PATCH v2 3/5] drm/tegra: Implement .mode_set_base()

2013-01-17 Thread Mark Zhang
On 01/15/2013 12:05 AM, Thierry Reding wrote: > The sequence for replacing the scanout buffer is much shorter than a > full mode change operation so implementing this callback considerably > speeds up cases where only a new framebuffer is to be scanned out. > > Signed-off-by: Thierry Reding >

[PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-17 Thread Mark Zhang
On 01/16/2013 07:53 PM, Lucas Stach wrote: > Am Mittwoch, den 16.01.2013, 19:10 +0800 schrieb Mark Zhang: >> I'm testing the pageflip & vblank change on cardhu. Seems the HDMI >> doesn't work(LVDS only is OK). I'll let you know if I get something. >> > Just to pro

Re: [PATCH v2 2/5] drm/tegra: Add plane support

2013-01-17 Thread Mark Zhang
On 01/15/2013 06:50 PM, Lucas Stach wrote: Am Dienstag, den 15.01.2013, 17:53 +0800 schrieb Mark Zhang: On 01/15/2013 12:05 AM, Thierry Reding wrote: Add support for the B and C planes which support RGB and YUV pixel formats and can be used as overlays or hardware cursor. I think hardware

[PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-16 Thread Mark Zhang
I'm testing the pageflip & vblank change on cardhu. Seems the HDMI doesn't work(LVDS only is OK). I'll let you know if I get something. Mark On 01/15/2013 12:06 AM, Thierry Reding wrote: > All the necessary support bits like .mode_set_base() and VBLANK are now > available, so page-flipping case

Re: [PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-16 Thread Mark Zhang
I'm testing the pageflip vblank change on cardhu. Seems the HDMI doesn't work(LVDS only is OK). I'll let you know if I get something. Mark On 01/15/2013 12:06 AM, Thierry Reding wrote: All the necessary support bits like .mode_set_base() and VBLANK are now available, so page-flipping case

Re: [PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-16 Thread Mark Zhang
On 01/16/2013 07:53 PM, Lucas Stach wrote: Am Mittwoch, den 16.01.2013, 19:10 +0800 schrieb Mark Zhang: I'm testing the pageflip vblank change on cardhu. Seems the HDMI doesn't work(LVDS only is OK). I'll let you know if I get something. Just to provide another data point: I'm running

Re: [PATCH v2 3/5] drm/tegra: Implement .mode_set_base()

2013-01-16 Thread Mark Zhang
On 01/15/2013 12:05 AM, Thierry Reding wrote: The sequence for replacing the scanout buffer is much shorter than a full mode change operation so implementing this callback considerably speeds up cases where only a new framebuffer is to be scanned out. Signed-off-by: Thierry Reding

Re: [PATCH v2 5/5] drm/tegra: Implement page-flipping support

2013-01-16 Thread Mark Zhang
On 01/15/2013 12:06 AM, Thierry Reding wrote: All the necessary support bits like .mode_set_base() and VBLANK are now available, so page-flipping case easily be implemented on top. Signed-off-by: Thierry Reding thierry.red...@avionic-design.de [...] + +static int tegra_dc_page_flip(struct

[PATCH v2 2/5] drm/tegra: Add plane support

2013-01-15 Thread Mark Zhang
On 01/15/2013 12:05 AM, Thierry Reding wrote: > Add support for the B and C planes which support RGB and YUV pixel > formats and can be used as overlays or hardware cursor. I think "hardware cursor" has specific meaning for Tegra(e.g: Tegra30 has a 32x32 24bpp or 64x64 2bpp hardware cursor). So

Re: [PATCH v2 2/5] drm/tegra: Add plane support

2013-01-15 Thread Mark Zhang
On 01/15/2013 12:05 AM, Thierry Reding wrote: Add support for the B and C planes which support RGB and YUV pixel formats and can be used as overlays or hardware cursor. I think hardware cursor has specific meaning for Tegra(e.g: Tegra30 has a 32x32 24bpp or 64x64 2bpp hardware cursor). So you

[PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-03 Thread Mark Zhang
On 01/03/2013 01:50 PM, Terje Bergstr?m wrote: > On 03.01.2013 05:31, Mark Zhang wrote: >> Sorry I didn't get it. Yes, in current design, you can pin all mem >> handles in one time but I haven't found anything related with "locking >> only once per submit". >

[PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-03 Thread Mark Zhang
On 01/02/2013 05:42 PM, Terje Bergstr?m wrote: > On 28.12.2012 11:14, Mark Zhang wrote: >> diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c >> index a936902..c3ded60 100644 >> --- a/drivers/gpu/drm/tegra/gr2d.c >> +++ b/drivers/gpu/drm/tegra/

[PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-03 Thread Mark Zhang
On 01/02/2013 05:25 PM, Terje Bergstr?m wrote: > On 26.12.2012 11:42, Mark Zhang wrote: [...] > >> >> if (!de) >> diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c >> index 07e8813..01ed10d 100644 >> --- a/drivers/gpu/host1x/dev

[PATCHv4 3/8] gpu: host1x: Add channel support

2013-01-02 Thread Mark Zhang
On 01/02/2013 05:31 PM, Terje Bergstr?m wrote: > On 02.01.2013 09:40, Mark Zhang wrote: >> On 12/21/2012 07:39 PM, Terje Bergstrom wrote: >>> Add support for host1x client modules, and host1x channels to submit >>> work to the clients. The work is submitted in GEM CMA

[PATCHv4 3/8] gpu: host1x: Add channel support

2013-01-02 Thread Mark Zhang
Just one minor issue. Check below. On 12/21/2012 07:39 PM, Terje Bergstrom wrote: > Add support for host1x client modules, and host1x channels to submit > work to the clients. The work is submitted in GEM CMA buffers, so > this patch adds support for them. > > Signed-off-by: Terje Bergstrom >

[RFC,libdrm 1/3] tegra: Add stream library

2013-01-02 Thread Mark Zhang
On 01/02/2013 02:31 PM, Terje Bergstr?m wrote: > On 02.01.2013 04:44, Mark Zhang wrote: >> Agree. If we are able to do something dynamically, normally that'll be >> better. >> >> Terje, we can get the Tegra version in FUSE. I think we don't need this >> kind of

[RFC,libdrm 1/3] tegra: Add stream library

2013-01-02 Thread Mark Zhang
On 12/31/2012 02:22 PM, Terje Bergstr?m wrote: > On 28.12.2012 22:48, Thierry Reding wrote: >> I disagree. We shouldn't be hiding this kind of detail behind an #ifdef. >> Instead it should be detected at runtime. Otherwise you'll need to build >> different versions of libdrm for every generation

Re: [PATCHv4 3/8] gpu: host1x: Add channel support

2013-01-02 Thread Mark Zhang
On 01/02/2013 05:31 PM, Terje Bergström wrote: On 02.01.2013 09:40, Mark Zhang wrote: On 12/21/2012 07:39 PM, Terje Bergstrom wrote: Add support for host1x client modules, and host1x channels to submit work to the clients. The work is submitted in GEM CMA buffers, so this patch adds support

Re: [PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-02 Thread Mark Zhang
On 01/02/2013 05:25 PM, Terje Bergström wrote: On 26.12.2012 11:42, Mark Zhang wrote: [...] if (!de) diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index 07e8813..01ed10d 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -38,6 +38,7

Re: [PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-02 Thread Mark Zhang
On 01/02/2013 05:42 PM, Terje Bergström wrote: On 28.12.2012 11:14, Mark Zhang wrote: diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c index a936902..c3ded60 100644 --- a/drivers/gpu/drm/tegra/gr2d.c +++ b/drivers/gpu/drm/tegra/gr2d.c @@ -131,6 +131,14 @@ static int

Re: [PATCHv4 0/8] Support for Tegra 2D hardware

2013-01-02 Thread Mark Zhang
On 01/03/2013 01:50 PM, Terje Bergström wrote: On 03.01.2013 05:31, Mark Zhang wrote: Sorry I didn't get it. Yes, in current design, you can pin all mem handles in one time but I haven't found anything related with locking only once per submit. My idea is: - remove job-addr_phys - assign

Re: [PATCHv4 3/8] gpu: host1x: Add channel support

2013-01-01 Thread Mark Zhang
Just one minor issue. Check below. On 12/21/2012 07:39 PM, Terje Bergstrom wrote: Add support for host1x client modules, and host1x channels to submit work to the clients. The work is submitted in GEM CMA buffers, so this patch adds support for them. Signed-off-by: Terje Bergstrom

[PATCHv4 0/8] Support for Tegra 2D hardware

2012-12-28 Thread Mark Zhang
Hi Terje, Here is the second part comments. I admit I still haven't finished reading the codes... really too many codes. :) Anyway I'll keep doing this when I have free slots. diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c index a936902..c3ded60 100644 ---

[RFC,libdrm 1/3] tegra: Add stream library

2012-12-28 Thread Mark Zhang
On 12/28/2012 04:50 PM, Arto Merilainen wrote: > On 12/28/2012 09:57 AM, Mark Zhang wrote: >> On 12/28/2012 03:45 PM, Arto Merilainen wrote: >>> On 12/28/2012 08:47 AM, Mark Zhang wrote: >>>>> + >>>>> +/* Add fences */ >>>>>

[RFC,libdrm 1/3] tegra: Add stream library

2012-12-28 Thread Mark Zhang
On 12/28/2012 03:45 PM, Arto Merilainen wrote: > On 12/28/2012 08:47 AM, Mark Zhang wrote: >>> +int tegra_fence_is_valid(const struct tegra_fence *fence) >>> +{ >>> +int valid = fence ? 1 : 0; >>> +valid = valid && fence->id != (uint

[RFC,libdrm 2/3] tegra: Add 2d library

2012-12-28 Thread Mark Zhang
I just skimmed the code of libdrm while I'm trying to understand the host1x driver. So below is what I found. Mark On 12/13/2012 10:01 PM, Arto Meril?inen wrote: > From: Francis Hart > > This patch introduces a simple 2d library on top of stream library. > > Signed-off-by: Francis Hart [...]

[RFC,libdrm 1/3] tegra: Add stream library

2012-12-28 Thread Mark Zhang
I just skimmed the code of libdrm while I'm trying to understand the host1x driver. So below is what I found. Mark On 12/13/2012 10:01 PM, Arto Meril?inen wrote: > From: Arto Merilainen > > This patch introduces tegra stream library. The library is used for > buffer management, command stream

Re: [RFC,libdrm 1/3] tegra: Add stream library

2012-12-28 Thread Mark Zhang
On 12/28/2012 04:50 PM, Arto Merilainen wrote: On 12/28/2012 09:57 AM, Mark Zhang wrote: On 12/28/2012 03:45 PM, Arto Merilainen wrote: On 12/28/2012 08:47 AM, Mark Zhang wrote: + +/* Add fences */ +if (num_fences) { + +tegra_stream_push(stream

Re: [PATCHv4 0/8] Support for Tegra 2D hardware

2012-12-28 Thread Mark Zhang
Hi Terje, Here is the second part comments. I admit I still haven't finished reading the codes... really too many codes. :) Anyway I'll keep doing this when I have free slots. diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c index a936902..c3ded60 100644 ---

Re: [RFC,libdrm 1/3] tegra: Add stream library

2012-12-27 Thread Mark Zhang
I just skimmed the code of libdrm while I'm trying to understand the host1x driver. So below is what I found. Mark On 12/13/2012 10:01 PM, Arto Meriläinen wrote: From: Arto Merilainen amerilai...@nvidia.com This patch introduces tegra stream library. The library is used for buffer

Re: [RFC,libdrm 1/3] tegra: Add stream library

2012-12-27 Thread Mark Zhang
On 12/28/2012 03:45 PM, Arto Merilainen wrote: On 12/28/2012 08:47 AM, Mark Zhang wrote: +int tegra_fence_is_valid(const struct tegra_fence *fence) +{ +int valid = fence ? 1 : 0; +valid = valid fence-id != (uint32_t) -1; +valid = valid fence-id 32; Hardcode here. Assume

[PATCHv4 0/8] Support for Tegra 2D hardware

2012-12-26 Thread Mark Zhang
Hi Terje, I applied your patches on top of upstream 1224 kernel. Then I read the codes. So here is my review comments(I use "git diff" to print out, check below). I admit it's easy for me to not need to find the corresponding lines in your 8 patch mails, but I've no idea whether it is ok for you.

Re: [PATCHv4 0/8] Support for Tegra 2D hardware

2012-12-26 Thread Mark Zhang
Hi Terje, I applied your patches on top of upstream 1224 kernel. Then I read the codes. So here is my review comments(I use git diff to print out, check below). I admit it's easy for me to not need to find the corresponding lines in your 8 patch mails, but I've no idea whether it is ok for you.

[PATCH 5/6] drm: tegra: clean out old gem prototypes

2012-12-20 Thread Mark Zhang
We must forget about that. I believe no one read the header files while review. So thanks. :) Mark On 12/20/2012 05:38 AM, Lucas Stach wrote: > There is no gem.c anymore, those functions are implemented by the > drm_cma_helpers now. > > Signed-off-by: Lucas Stach > --- >

  1   2   >