Re: [PATCH 02/26] drm: Switch DRIVER_ flags to an enum

Daniel Vetter
2019-01-25T09:35:10Z

On Thu, Jan 24, 2019 at 06:38:33PM +0100, Sam Ravnborg wrote:
> Hi Daniel.
>
> > +
> > + /**
> > + * @DRIVER_HAVE_DMA:
> > + *
> > + * Driver supports DMA, the userspace DMA API will be supported. Only
> > + * for legacy drivers. Do not use.
> > + */
> > + DRIVER_HAVE_DMA = BIT(4),
>
> What about grouping all the "legacy, do not use" flags in the bottom.
> Maybe counting backwards.
>
> Then one does not have "noise" in-between when trying to rad and understand the
> relevant flags for a new driver.
> Unless I am mistaken nothing should break because we change the bit for a certain
> function, but I see you kept the current order thus the current vlaues.

Good idea, will do.

> > @@ -662,7 +766,7 @@ static inline bool drm_dev_is_unplugged(struct drm_device *dev)
> > * @feature: feature flag
> > *
> > * This checks @dev for driver features, see &drm_driver.driver_features,
> > - * &drm_device.driver_features, and the various DRIVER_\* flags.
> > + * &drm_device.driver_features, and the various &enum drm_driver_feature flags.
> > *
> > * Returns true if the @feature is supported, false otherwise.
> > */
>
> Thanks for fixing this - I had a patch floating to do the same.
> But this fix is better than what I did.

Just realized I've forgotten to remove the FIXME from the commit message
about this.

> With or without a change in ordering you can add:
>
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

I'll respind, thanks for reviewing. Can I motivate you to also review
patch 1, with that I could merge the first 2 in this series.

Thanks, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org