Re: [PATCH libdrm 2/2] modetest: print signed values correctly

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

 



Hi Gustavo,

On 22 March 2016 at 21:42, Gustavo Padovan <gustavo@xxxxxxxxxxx> wrote:
> From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> ---
>  tests/modetest/modetest.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/tests/modetest/modetest.c b/tests/modetest/modetest.c
> index a5ac5bd..21d5438 100644
> --- a/tests/modetest/modetest.c
> +++ b/tests/modetest/modetest.c
> @@ -314,6 +314,8 @@ static void dump_prop(struct device *dev, drmModePropertyPtr prop,
>         printf("\t\tvalue:");
>         if (drm_property_type_is(prop, DRM_MODE_PROP_BLOB))
>                 dump_blob(dev, value);
> +       else if (drm_property_type_is(prop, DRM_MODE_PROP_SIGNED_RANGE))
> +               printf(" %"PRId64"\n", value);
>         else
>                 printf(" %"PRIu64"\n", value);
Looks like proptest needs a similar fix. I'll push that alongside this patch.

A few suggestions for follow up work (in case you get bored)
 - factor dump_prop/blob into tests/util/kms.c and use it in proptest + modetest
 - prepend "current" or alike to "value". or any other way to make
"value" stand out from "values".
 - handle DRM_MODE_PROP_OBJECT :-)

Thanks
Emil
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux