Re: How to support various hardware blocks in drm driver

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

 



On Tue, Mar 18, 2014 at 4:26 AM, Inki Dae <inki.dae@xxxxxxxxxxx> wrote:
>
> enum {
>         DRM_HW_BLOCK_PANEL,
>         DRM_HW_BLOCK_BRIDGE,
>         DRM_HW_BLOCK_ENHANCE,
> };
>
> struct drm_hw_block {
>         unsigned int type;
>         struct device *dev;

just fyi, drop the 'struct device' ptr.. that sort of thing shouldn't
be in the base struct.

(and it should subclass 'struct drm_mode_object base' too)

>         struct drm_device *drm;
>
>         /* Used commonly. */
>         int (*disable)(struct drm_hw_block *block);
>         int (*enable)(struct drm_hw_block *block);
>
>         /* For parallel panels. */
>         struct drm_connector *connector;
>         int (*get_modes)(struct drm_hw_block *block);

so, other than this part, the rest is already in drm_bridge_funcs.
But seems like something that only makes sense at the end of the chain
(ie. connector/panel end of things).. to me it makes sense to instead
just keep panel as it's own thing.

>         /* For LVDS bridge devices. */
>         void (*mode_fixup)(struct drm_hw_block *block);
>         void (*mode_set)(struct drm_hw_block *block);
>         ....
>
>         /* For Image Enhancement devices. */
>         ....
>
>         struct list_head list;
> };
>
> Of course, we could separate above callbacks to each structure like below,

yup callbacks should be split out (and normally in a 'const' data
structure if possible)

BR,
-R
_______________________________________________
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