Lines Matching refs:r
55 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1 argument
68 #define DRM_RECT_FP_ARG(r) \ argument
69 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
70 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
71 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
72 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
82 static inline void drm_rect_init(struct drm_rect *r, int x, int y, in drm_rect_init() argument
85 r->x1 = x; in drm_rect_init()
86 r->y1 = y; in drm_rect_init()
87 r->x2 = x + width; in drm_rect_init()
88 r->y2 = y + height; in drm_rect_init()
103 static inline void drm_rect_adjust_size(struct drm_rect *r, int dw, int dh) in drm_rect_adjust_size() argument
105 r->x1 -= dw >> 1; in drm_rect_adjust_size()
106 r->y1 -= dh >> 1; in drm_rect_adjust_size()
107 r->x2 += (dw + 1) >> 1; in drm_rect_adjust_size()
108 r->y2 += (dh + 1) >> 1; in drm_rect_adjust_size()
120 static inline void drm_rect_translate(struct drm_rect *r, int dx, int dy) in drm_rect_translate() argument
122 r->x1 += dx; in drm_rect_translate()
123 r->y1 += dy; in drm_rect_translate()
124 r->x2 += dx; in drm_rect_translate()
125 r->y2 += dy; in drm_rect_translate()
137 static inline void drm_rect_translate_to(struct drm_rect *r, int x, int y) in drm_rect_translate_to() argument
139 drm_rect_translate(r, x - r->x1, y - r->y1); in drm_rect_translate_to()
150 static inline void drm_rect_downscale(struct drm_rect *r, int horz, int vert) in drm_rect_downscale() argument
152 r->x1 /= horz; in drm_rect_downscale()
153 r->y1 /= vert; in drm_rect_downscale()
154 r->x2 /= horz; in drm_rect_downscale()
155 r->y2 /= vert; in drm_rect_downscale()
165 static inline int drm_rect_width(const struct drm_rect *r) in drm_rect_width() argument
167 return r->x2 - r->x1; in drm_rect_width()
177 static inline int drm_rect_height(const struct drm_rect *r) in drm_rect_height() argument
179 return r->y2 - r->y1; in drm_rect_height()
189 static inline bool drm_rect_visible(const struct drm_rect *r) in drm_rect_visible() argument
191 return drm_rect_width(r) > 0 && drm_rect_height(r) > 0; in drm_rect_visible()
209 bool drm_rect_intersect(struct drm_rect *r, const struct drm_rect *clip);
219 const struct drm_rect *r, bool fixed_point);
220 void drm_rect_rotate(struct drm_rect *r,
223 void drm_rect_rotate_inv(struct drm_rect *r,