[PATCH] tests/testdisplay.c: make the 3th pipe finish all the mode setting.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 at lists.freedesktop.org
> Cc: jbarnes at 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 at 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



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux