mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
Revert "drm/vc4: Assign 32 overlay planes to writeback only"
This reverts commit 862e697857.
This commit is contained in:
@@ -2660,28 +2660,13 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
|
|||||||
return plane;
|
return plane;
|
||||||
}
|
}
|
||||||
|
|
||||||
#define VC4_NUM_OVERLAY_PLANES 16
|
#define VC4_NUM_OVERLAY_PLANES 48
|
||||||
#define VC4_NUM_TXP_OVERLAY_PLANES 32
|
|
||||||
|
|
||||||
int vc4_plane_create_additional_planes(struct drm_device *drm)
|
int vc4_plane_create_additional_planes(struct drm_device *drm)
|
||||||
{
|
{
|
||||||
struct drm_plane *cursor_plane;
|
struct drm_plane *cursor_plane;
|
||||||
struct drm_crtc *crtc;
|
struct drm_crtc *crtc;
|
||||||
unsigned int i;
|
unsigned int i;
|
||||||
struct drm_crtc *txp_crtc;
|
|
||||||
uint32_t non_txp_crtc_mask;
|
|
||||||
|
|
||||||
drm_for_each_crtc(crtc, drm) {
|
|
||||||
struct vc4_crtc *vc4_crtc = to_vc4_crtc(crtc);
|
|
||||||
|
|
||||||
if (vc4_crtc->feeds_txp) {
|
|
||||||
txp_crtc = crtc;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
non_txp_crtc_mask = GENMASK(drm->mode_config.num_crtc - 1, 0) -
|
|
||||||
drm_crtc_mask(txp_crtc);
|
|
||||||
|
|
||||||
/* Set up some arbitrary number of planes. We're not limited
|
/* Set up some arbitrary number of planes. We're not limited
|
||||||
* by a set number of physical registers, just the space in
|
* by a set number of physical registers, just the space in
|
||||||
@@ -2695,22 +2680,7 @@ int vc4_plane_create_additional_planes(struct drm_device *drm)
|
|||||||
for (i = 0; i < VC4_NUM_OVERLAY_PLANES; i++) {
|
for (i = 0; i < VC4_NUM_OVERLAY_PLANES; i++) {
|
||||||
struct drm_plane *plane =
|
struct drm_plane *plane =
|
||||||
vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY,
|
vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY,
|
||||||
non_txp_crtc_mask);
|
GENMASK(drm->mode_config.num_crtc - 1, 0));
|
||||||
|
|
||||||
if (IS_ERR(plane))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
/* Create zpos property. Max of all the overlays + 1 primary +
|
|
||||||
* 1 cursor plane on a crtc.
|
|
||||||
*/
|
|
||||||
drm_plane_create_zpos_property(plane, i + 1, 1,
|
|
||||||
VC4_NUM_OVERLAY_PLANES + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < VC4_NUM_TXP_OVERLAY_PLANES; i++) {
|
|
||||||
struct drm_plane *plane =
|
|
||||||
vc4_plane_init(drm, DRM_PLANE_TYPE_OVERLAY,
|
|
||||||
drm_crtc_mask(txp_crtc));
|
|
||||||
|
|
||||||
if (IS_ERR(plane))
|
if (IS_ERR(plane))
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user