Rev 6084 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6084 | Rev 6937 | ||
---|---|---|---|
Line 55... | Line 55... | ||
55 | * that switch is complete drivers shouldn't use these any longer, instead using |
55 | * that switch is complete drivers shouldn't use these any longer, instead using |
56 | * the proper legacy implementations for update and disable plane hooks provided |
56 | * the proper legacy implementations for update and disable plane hooks provided |
57 | * by the atomic helpers. |
57 | * by the atomic helpers. |
58 | * |
58 | * |
59 | * Again drivers are strongly urged to switch to the new interfaces. |
59 | * Again drivers are strongly urged to switch to the new interfaces. |
- | 60 | * |
|
- | 61 | * The plane helpers share the function table structures with other helpers, |
|
- | 62 | * specifically also the atomic helpers. See struct &drm_plane_helper_funcs for |
|
- | 63 | * the details. |
|
60 | */ |
64 | */ |
Line 61... | Line 65... | ||
61 | 65 | ||
62 | /* |
66 | /* |
63 | * This is the minimal list of formats that seem to be safe for modeset use |
67 | * This is the minimal list of formats that seem to be safe for modeset use |
Line 162... | Line 166... | ||
162 | /* Check scaling */ |
166 | /* Check scaling */ |
163 | hscale = drm_rect_calc_hscale(src, dest, min_scale, max_scale); |
167 | hscale = drm_rect_calc_hscale(src, dest, min_scale, max_scale); |
164 | vscale = drm_rect_calc_vscale(src, dest, min_scale, max_scale); |
168 | vscale = drm_rect_calc_vscale(src, dest, min_scale, max_scale); |
165 | if (hscale < 0 || vscale < 0) { |
169 | if (hscale < 0 || vscale < 0) { |
166 | DRM_DEBUG_KMS("Invalid scaling of plane\n"); |
170 | DRM_DEBUG_KMS("Invalid scaling of plane\n"); |
- | 171 | drm_rect_debug_print("src: ", src, true); |
|
- | 172 | drm_rect_debug_print("dst: ", dest, false); |
|
167 | return -ERANGE; |
173 | return -ERANGE; |
168 | } |
174 | } |
Line 169... | Line 175... | ||
169 | 175 | ||
170 | *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale); |
176 | *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale); |
Line 178... | Line 184... | ||
178 | */ |
184 | */ |
179 | return 0; |
185 | return 0; |
Line 180... | Line 186... | ||
180 | 186 | ||
181 | if (!can_position && !drm_rect_equals(dest, clip)) { |
187 | if (!can_position && !drm_rect_equals(dest, clip)) { |
- | 188 | DRM_DEBUG_KMS("Plane must cover entire CRTC\n"); |
|
- | 189 | drm_rect_debug_print("dst: ", dest, false); |
|
182 | DRM_DEBUG_KMS("Plane must cover entire CRTC\n"); |
190 | drm_rect_debug_print("clip: ", clip, false); |
183 | return -EINVAL; |
191 | return -EINVAL; |
Line 184... | Line 192... | ||
184 | } |
192 | } |
185 | 193 | ||
Line 365... | Line 373... | ||
365 | /* possible_crtc's will be filled in later by crtc_init */ |
373 | /* possible_crtc's will be filled in later by crtc_init */ |
366 | ret = drm_universal_plane_init(dev, primary, 0, |
374 | ret = drm_universal_plane_init(dev, primary, 0, |
367 | &drm_primary_helper_funcs, |
375 | &drm_primary_helper_funcs, |
368 | safe_modeset_formats, |
376 | safe_modeset_formats, |
369 | ARRAY_SIZE(safe_modeset_formats), |
377 | ARRAY_SIZE(safe_modeset_formats), |
370 | DRM_PLANE_TYPE_PRIMARY); |
378 | DRM_PLANE_TYPE_PRIMARY, NULL); |
371 | if (ret) { |
379 | if (ret) { |
372 | kfree(primary); |
380 | kfree(primary); |
373 | primary = NULL; |
381 | primary = NULL; |
374 | } |
382 | } |
Line 392... | Line 400... | ||
392 | const struct drm_crtc_funcs *funcs) |
400 | const struct drm_crtc_funcs *funcs) |
393 | { |
401 | { |
394 | struct drm_plane *primary; |
402 | struct drm_plane *primary; |
Line 395... | Line 403... | ||
395 | 403 | ||
396 | primary = create_primary_plane(dev); |
404 | primary = create_primary_plane(dev); |
- | 405 | return drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs, |
|
397 | return drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs); |
406 | NULL); |
398 | } |
407 | } |
Line 399... | Line 408... | ||
399 | EXPORT_SYMBOL(drm_crtc_init); |
408 | EXPORT_SYMBOL(drm_crtc_init); |
400 | 409 |