* [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting.
@ 2011-12-01 10:57 Yi Sun
2011-12-16 5:58 ` Sun, Yi
2011-12-16 13:17 ` Eugeni Dodonov
0 siblings, 2 replies; 3+ messages in thread
From: Yi Sun @ 2011-12-01 10:57 UTC (permalink / raw)
To: intel-gfx
If test all modes rather than preferred mode, remove framebuffer and set CRTC to zero after each connector mode setting.
Signed-off-by: Sun Yi <yi.sun@intel.com>
---
tests/testdisplay.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/tests/testdisplay.c b/tests/testdisplay.c
index 3c9741c..7e25296 100644
--- a/tests/testdisplay.c
+++ b/tests/testdisplay.c
@@ -373,7 +373,10 @@ static void connector_find_preferred_mode(struct connector *c)
}
c->crtc = resources->crtcs[i];
c->pipe = i;
- resources->crtcs[i] = 0;
+
+ if(test_preferred_mode)
+ resources->crtcs[i] = 0;
+
c->connector = connector;
}
@@ -941,6 +944,7 @@ set_mode(struct connector *c)
continue;
}
+ fprintf(stdout, "CRTS(%u):",c->crtc);
dump_mode(&c->mode);
if (drmModeSetCrtc(fd, c->crtc, fb_id, 0, 0,
&c->id, 1, &c->mode)) {
@@ -955,6 +959,12 @@ set_mode(struct connector *c)
if (sleep_between_modes && test_all_modes)
sleep(sleep_between_modes);
+
+ }
+
+ if(!test_preferred_mode){
+ drmModeRmFB(fd,fb_id);
+ drmModeSetCrtc(fd, c->crtc, fb_id, 0, 0, &c->id, 1, 0);
}
drmModeFreeEncoder(c->encoder);
--
1.7.5.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting.
2011-12-01 10:57 [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting Yi Sun
@ 2011-12-16 5:58 ` Sun, Yi
2011-12-16 13:17 ` Eugeni Dodonov
1 sibling, 0 replies; 3+ messages in thread
From: Sun, Yi @ 2011-12-16 5:58 UTC (permalink / raw)
To: Sun, Yi, intel-gfx@lists.freedesktop.org
Daniel,
Need your review for testdisplay patch.
Http://lists.freedesktop.org/archives/intel-gfx/2011-December/013771.html
Thanks
--Yi,Sun
> -----Original Message-----
> From: Sun, Yi
> Sent: Thursday, December 01, 2011 6:57 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: jbarnes@virtuousgeek.org; Jin, Gordon; Sun, Yi
> Subject: [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode
> setting.
>
> If test all modes rather than preferred mode, remove framebuffer and set
> CRTC to zero after each connector mode setting.
>
> Signed-off-by: Sun Yi <yi.sun@intel.com>
> ---
> tests/testdisplay.c | 12 +++++++++++-
> 1 files changed, 11 insertions(+), 1 deletions(-)
>
> diff --git a/tests/testdisplay.c b/tests/testdisplay.c
> index 3c9741c..7e25296 100644
> --- a/tests/testdisplay.c
> +++ b/tests/testdisplay.c
> @@ -373,7 +373,10 @@ static void connector_find_preferred_mode(struct
> connector *c)
> }
> c->crtc = resources->crtcs[i];
> c->pipe = i;
> - resources->crtcs[i] = 0;
> +
> + if(test_preferred_mode)
> + resources->crtcs[i] = 0;
> +
> c->connector = connector;
> }
>
> @@ -941,6 +944,7 @@ set_mode(struct connector *c)
> continue;
> }
>
> + fprintf(stdout, "CRTS(%u):",c->crtc);
> dump_mode(&c->mode);
> if (drmModeSetCrtc(fd, c->crtc, fb_id, 0, 0,
> &c->id, 1, &c->mode)) {
> @@ -955,6 +959,12 @@ set_mode(struct connector *c)
>
> if (sleep_between_modes && test_all_modes)
> sleep(sleep_between_modes);
> +
> + }
> +
> + if(!test_preferred_mode){
> + drmModeRmFB(fd,fb_id);
> + drmModeSetCrtc(fd, c->crtc, fb_id, 0, 0, &c->id, 1, 0);
> }
>
> drmModeFreeEncoder(c->encoder);
> --
> 1.7.5.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting.
2011-12-01 10:57 [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting Yi Sun
2011-12-16 5:58 ` Sun, Yi
@ 2011-12-16 13:17 ` Eugeni Dodonov
1 sibling, 0 replies; 3+ messages in thread
From: Eugeni Dodonov @ 2011-12-16 13:17 UTC (permalink / raw)
To: Yi Sun; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 406 bytes --]
On Thu, Dec 1, 2011 at 08:57, Yi Sun <yi.sun@intel.com> wrote:
> If test all modes rather than preferred mode, remove framebuffer and set
> CRTC to zero after each connector mode setting.
>
> Signed-off-by: Sun Yi <yi.sun@intel.com>
>
I forgot to comment on this before, but better late than never.
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
--
Eugeni Dodonov
<http://eugeni.dodonov.net/>
[-- Attachment #1.2: Type: text/html, Size: 796 bytes --]
[-- Attachment #2: Type: text/plain, Size: 159 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-12-16 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01 10:57 [PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting Yi Sun
2011-12-16 5:58 ` Sun, Yi
2011-12-16 13:17 ` Eugeni Dodonov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox