All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Widawsky <ben@bwidawsk.net>
To: "Sun, Yi" <yi.sun@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2] tests/testdisplay: Specify the display.
Date: Wed, 26 Dec 2012 19:03:45 -0800	[thread overview]
Message-ID: <20121226190345.00006d31@unknown> (raw)
In-Reply-To: <D9F66AA509623343B6A9A3D4502D5A520FEB10E7@SHSMSX102.ccr.corp.intel.com>

On Thu, 27 Dec 2012 01:45:59 +0000
"Sun, Yi" <yi.sun@intel.com> wrote:

> 
> 
> Thanks
>     --Sun, Yi

Ah, misunderstood the commit message. It looks good to me. Do you have
push access?

> 
> > -----Original Message-----
> > From: Ben Widawsky [mailto:ben@bwidawsk.net]
> > Sent: Thursday, December 27, 2012 2:56 AM
> > To: Sun, Yi
> > Cc: intel-gfx@lists.freedesktop.org
> > Subject: Re: [Intel-gfx] [PATCH v2] tests/testdisplay: Specify the
> > display.
> > 
> > On Wed, 26 Dec 2012 17:22:57 +0800
> > Yi Sun <yi.sun@intel.com> wrote:
> > 
> > > It can specify the display when use option '-o'.
> > > E.g. command "./testdiplay -o 1,4" means setting number 4 mode
> > > line on the
> > number 1 display.
> > >
> > > v2. Specify the display by id which can be got from option '-i'
> > 
> > where?
> [Sun, Yi] Run ./testdisplay -i , we can got following:
> Connectors:
> id      encoder status          type    size (mm)       modes
> 7       0       disconnected    VGA     0x0             0
> 10      0       disconnected    HDMI-A  0x0             0
> 13      0       disconnected    DisplayPort     0x0             0
> 16      0       disconnected    HDMI-A  0x0             0
> 18      17      connected       HDMI-A  480x270         31
>   modes:
>   name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot flags type
> clock ......
> 
> I meant we can specify a display by the connector id which list as
> the first column.
> 
> Thanks
> 	--Sun, Yi
> 
> > 
> > >
> > > Signed-off-by: Yi Sun <yi.sun@intel.com>
> > >
> > > diff --git a/tests/testdisplay.c b/tests/testdisplay.c index
> > > 7287487..7aef940 100644
> > > --- a/tests/testdisplay.c
> > > +++ b/tests/testdisplay.c
> > > @@ -72,7 +72,7 @@ int dump_info = 0, test_all_modes =0,
> > > test_preferred_mode = 0, force_mode = 0,  int sleep_between_modes
> > > = 5; uint32_t depth = 24, stride, bpp;  int qr_code = 0; -int
> > > only_one_mode = 0, specified_mode_num = 0;
> > > +int only_one_mode = 0, specified_mode_num = 0, specified_disp_id
> > > = 0;
> > >
> > >  drmModeModeInfo force_timing;
> > >
> > > @@ -598,6 +598,9 @@ int update_display(void)
> > >  		/* Find any connected displays */
> > >  		for (c = 0; c < resources->count_connectors;
> > > c++) { connectors[c].id = resources->connectors[c];
> > > +			if ( connectors[c].id !=
> > > specified_disp_id )
> > > +				continue;
> > > +
> > >  			set_mode(&connectors[c]);
> > >  		}
> > >  	}
> > > @@ -618,7 +621,7 @@ static void __attribute__((noreturn))
> > > usage(char
> > *name)
> > >  	fprintf(stderr, "\t-m\ttest the preferred mode\n");
> > >  	fprintf(stderr, "\t-t\tuse a tiled framebuffer\n");
> > >  	fprintf(stderr, "\t-r\tprint a QR code on the screen
> > > whose content is
> > \"pass\" for the automatic test\n");
> > > -	fprintf(stderr, "\t-o\t<number of the mode>\tonly test
> > > specified mode\n");
> > > +	fprintf(stderr, "\t-o\t<id of the display>,<number of the
> > > +mode>\tonly test specified mode on the specified display\n");
> > >  	fprintf(stderr, "\t-f\t<clock
> > MHz>,<hdisp>,<hsync-start>,<hsync-end>,<htotal>,\n");
> > >  	fprintf(stderr,
> > > "\t\t<vdisp>,<vsync-start>,<vsync-end>,<vtotal>\n");
> > > fprintf(stderr, "\t\ttest force mode\n"); @@ -715,7 +718,7 @@ int
> > > main(int argc, char **argv) break;
> > >  		case 'o':
> > >  			only_one_mode = 1;
> > > -			specified_mode_num = atoi(optarg);
> > > +			sscanf(optarg, "%d,%d",
> > > &specified_disp_id,
> > &specified_mode_num);
> > >  			break;
> > >  		default:
> > >  			fprintf(stderr, "unknown option %c\n",
> > > c);
> > 
> > 
> > 
> > --
> > Ben Widawsky, Intel Open Source Technology Center

  reply	other threads:[~2012-12-27  3:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-26  9:22 [PATCH v2] tests/testdisplay: Specify the display Yi Sun
2012-12-26 18:55 ` Ben Widawsky
2012-12-27  1:45   ` Sun, Yi
2012-12-27  3:03     ` Ben Widawsky [this message]
2012-12-27  9:23       ` Sun, Yi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121226190345.00006d31@unknown \
    --to=ben@bwidawsk.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=yi.sun@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.