Lines Matching refs:r

74 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1  argument
87 #define DRM_RECT_FP_ARG(r) \ argument
88 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
89 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
90 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
91 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
101 static inline void drm_rect_init(struct drm_rect *r, int x, int y, in drm_rect_init() argument
104 r->x1 = x; in drm_rect_init()
105 r->y1 = y; in drm_rect_init()
106 r->x2 = x + width; in drm_rect_init()
107 r->y2 = y + height; in drm_rect_init()
122 static inline void drm_rect_adjust_size(struct drm_rect *r, int dw, int dh) in drm_rect_adjust_size() argument
124 r->x1 -= dw >> 1; in drm_rect_adjust_size()
125 r->y1 -= dh >> 1; in drm_rect_adjust_size()
126 r->x2 += (dw + 1) >> 1; in drm_rect_adjust_size()
127 r->y2 += (dh + 1) >> 1; in drm_rect_adjust_size()
139 static inline void drm_rect_translate(struct drm_rect *r, int dx, int dy) in drm_rect_translate() argument
141 r->x1 += dx; in drm_rect_translate()
142 r->y1 += dy; in drm_rect_translate()
143 r->x2 += dx; in drm_rect_translate()
144 r->y2 += dy; in drm_rect_translate()
156 static inline void drm_rect_translate_to(struct drm_rect *r, int x, int y) in drm_rect_translate_to() argument
158 drm_rect_translate(r, x - r->x1, y - r->y1); in drm_rect_translate_to()
169 static inline void drm_rect_downscale(struct drm_rect *r, int horz, int vert) in drm_rect_downscale() argument
171 r->x1 /= horz; in drm_rect_downscale()
172 r->y1 /= vert; in drm_rect_downscale()
173 r->x2 /= horz; in drm_rect_downscale()
174 r->y2 /= vert; in drm_rect_downscale()
184 static inline int drm_rect_width(const struct drm_rect *r) in drm_rect_width() argument
186 return r->x2 - r->x1; in drm_rect_width()
196 static inline int drm_rect_height(const struct drm_rect *r) in drm_rect_height() argument
198 return r->y2 - r->y1; in drm_rect_height()
208 static inline bool drm_rect_visible(const struct drm_rect *r) in drm_rect_visible() argument
210 return drm_rect_width(r) > 0 && drm_rect_height(r) > 0; in drm_rect_visible()
241 bool drm_rect_intersect(struct drm_rect *r, const struct drm_rect *clip);
251 const struct drm_rect *r, bool fixed_point);
252 void drm_rect_rotate(struct drm_rect *r,
255 void drm_rect_rotate_inv(struct drm_rect *r,