[Freedreno] [PATCH] drm: BIT(DRM_ROTATE_?) -> DRM_ROTATE_?

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Thu Jul 28 06:44:30 UTC 2016


On ti, 2016-07-26 at 10:49 -0400, Sean Paul wrote:
> On Mon, Jul 25, 2016 at 3:00 AM, Joonas Lahtinen
> <joonas.lahtinen at linux.intel.com> wrote:
> > diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
> > index 3edeaf8..57bbc61 100644
> > --- a/include/drm/drm_crtc.h
> > +++ b/include/drm/drm_crtc.h
> > @@ -84,13 +84,13 @@ static inline uint64_t I642U64(int64_t val)
> >   * DRM_REFLECT_Y reflects the image along the specified axis prior to rotation
> >   */
> >  #define DRM_ROTATE_MASK 0x0f
> > -#define DRM_ROTATE_0   0
> > -#define DRM_ROTATE_90  1
> > -#define DRM_ROTATE_180 2
> > -#define DRM_ROTATE_270 3
> > +#define DRM_ROTATE_0   BIT(0)
> > +#define DRM_ROTATE_90  BIT(1)
> > +#define DRM_ROTATE_180 BIT(2)
> > +#define DRM_ROTATE_270 BIT(3)
> >  #define DRM_REFLECT_MASK (~DRM_ROTATE_MASK)
> It's probably a good time to give these masks a little love. Could we
> just generate them (both ROTATE and REFLECT) from the ROTATE and
> REFLECT values now?

I was consider it too, so I think it would be an OK change. Fine with
the patch otherwise? I can send a revised version with that changed.

Regards, Joonas

> 
> Sean
> 
> > 
> > -#define DRM_REFLECT_X  4
> > -#define DRM_REFLECT_Y  5
> > +#define DRM_REFLECT_X  BIT(4)
> > +#define DRM_REFLECT_Y  BIT(5)
> > 
> >  enum drm_connector_force {
> >         DRM_FORCE_UNSPECIFIED,
> > --
> > 2.5.5
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel at lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Freedreno mailing list