All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Rob Clark <rob.clark@linaro.org>
Cc: Rob Clark <rob@ti.com>, Paulo Zanoni <paulo.r.zanoni@intel.com>,
	dri-devel@lists.freedesktop.org, patches@linaro.org
Subject: Re: [PATCH libdrm 8/8] proptest: support plane properties
Date: Thu, 07 Jun 2012 14:09:52 +0900	[thread overview]
Message-ID: <4FD037A0.1080302@samsung.com> (raw)
In-Reply-To: <1338919594-25392-9-git-send-email-rob.clark@linaro.org>

Hi, Rob.

On 06/06/2012 03:06 AM, Rob Clark wrote:
> From: Rob Clark<rob@ti.com>
>
> Add support to display plane properties.

Do you not support to set property for plane?

>
> Signed-off-by: Rob Clark<rob@ti.com>
> ---
>   tests/proptest/proptest.c |   32 ++++++++++++++++++++++++++++++++
>   1 file changed, 32 insertions(+)
>
> diff --git a/tests/proptest/proptest.c b/tests/proptest/proptest.c
> index fa34a48..aac6b8f 100644
> --- a/tests/proptest/proptest.c
> +++ b/tests/proptest/proptest.c
> @@ -39,6 +39,7 @@
>
>   int fd;
>   drmModeResPtr res = NULL;
> +drmModePlaneResPtr plane_res = NULL;
>
>   const char *connector_type_str(uint32_t type)
>   {
> @@ -239,10 +240,33 @@ static void listCrtcProperties(void)
>   	}
>   }
>
> +static void listPlaneProperties(void)
> +{
> +	int i;
> +	drmModePlanePtr p;
> +
> +	for (i = 0; i<  plane_res->count_planes; i++) {
> +		p = drmModeGetPlane(fd, plane_res->planes[i]);
> +
> +		if (!p) {
> +			fprintf(stderr, "Could not get plane %u: %s\n",
> +				plane_res->planes[i], strerror(errno));
> +			continue;
> +		}
> +
> +		printf("Plane %u\n", p->plane_id);
> +
> +		listObjectProperties(p->plane_id, DRM_MODE_OBJECT_PLANE);
> +
> +		drmModeFreePlane(p);
> +	}
> +}
> +
>   static void listAllProperties(void)
>   {
>   	listConnectorProperties();
>   	listCrtcProperties();
> +	listPlaneProperties();
>   }
>
>   static int setProperty(char *argv[])
> @@ -309,6 +333,14 @@ int main(int argc, char *argv[])
>   		goto done;
>   	}
>
> +	plane_res = drmModeGetPlaneResources(fd);
> +	if (!plane_res) {
> +		fprintf(stderr, "Failed to get plane resources: %s\n",
> +			strerror(errno));
> +		ret = 1;
> +		goto done;
> +	}
> +
>   	if (argc<  2) {
>   		listAllProperties();
>   	} else if (argc == 5) {

  reply	other threads:[~2012-06-07  5:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05 18:06 [PATCH libdrm 0/8] Latest properties patches Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 1/8] Add support for generic object properties IOCTLs Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 2/8] modetest: print CRTC properties Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 3/8] tests: add proptest Rob Clark
2012-06-07  5:03   ` Joonyoung Shim
2012-06-05 18:06 ` [PATCH libdrm 4/8] Add support for bitmask properties Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 5/8] modetest: support " Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 6/8] modetest: support plane properties Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 7/8] proptest: support bitmask properties Rob Clark
2012-06-05 18:06 ` [PATCH libdrm 8/8] proptest: support plane properties Rob Clark
2012-06-07  5:09   ` Joonyoung Shim [this message]
2012-06-07 14:45     ` Rob Clark

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=4FD037A0.1080302@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=patches@linaro.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=rob.clark@linaro.org \
    --cc=rob@ti.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.