Re: [RFC v2 1/5] video: Add generic display entity core

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

 



Hi,

On 2012-11-22 23:45, Laurent Pinchart wrote:
> +/**
> + * display_entity_get_modes - Get video modes supported by the display entity
> + * @entity The display entity
> + * @modes: Pointer to an array of modes
> + *
> + * Fill the modes argument with a pointer to an array of video modes. The array
> + * is owned by the display entity.
> + *
> + * Return the number of supported modes on success (including 0 if no mode is
> + * supported) or a negative error code otherwise.
> + */
> +int display_entity_get_modes(struct display_entity *entity,
> +			     const struct videomode **modes)
> +{
> +	if (!entity->ops.ctrl || !entity->ops.ctrl->get_modes)
> +		return 0;
> +
> +	return entity->ops.ctrl->get_modes(entity, modes);
> +}
> +EXPORT_SYMBOL_GPL(display_entity_get_modes);
> +
> +/**
> + * display_entity_get_size - Get display entity physical size
> + * @entity: The display entity
> + * @width: Physical width in millimeters
> + * @height: Physical height in millimeters
> + *
> + * When applicable, for instance for display panels, retrieve the display
> + * physical size in millimeters.
> + *
> + * Return 0 on success or a negative error code otherwise.
> + */
> +int display_entity_get_size(struct display_entity *entity,
> +			    unsigned int *width, unsigned int *height)
> +{
> +	if (!entity->ops.ctrl || !entity->ops.ctrl->get_size)
> +		return -EOPNOTSUPP;
> +
> +	return entity->ops.ctrl->get_size(entity, width, height);
> +}
> +EXPORT_SYMBOL_GPL(display_entity_get_size);

How do you envision these to be used with, say, DVI monitors with EDID
data? Should each panel driver, that manages a device with EDID, read
and parse the EDID itself? I guess that shouldn't be too difficult with
a common EDID lib, but that will only expose some of the information
found from EDID. Should the upper levels also have a way to get the raw
EDID data, in addition to funcs like above?

 Tomi


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://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