Skip to content

FKMS - correct possible_crtcs flags, and increase the number of planes #3740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 13, 2020

Conversation

6by9
Copy link
Contributor

@6by9 6by9 commented Jul 20, 2020

No description provided.

@6by9
Copy link
Contributor Author

6by9 commented Jul 28, 2020

@pelwell @popcornmix Any comment on this one?

@pelwell
Copy link
Contributor

pelwell commented Jul 28, 2020

What's wrong with something like:

	for (i = 0; i < PLANES_PER_CRTC; i++) {
		planes[i] = vc4_fkms_plane_init(drm,
						(i == 0) ? DRM_PLANE_TYPE_PRIMARY :
						(i == PLANES_PER_CRTC -1) ? DRM_PLANE_TYPE_CURSOR :
						DRM_PLANE_TYPE_OVERLAY,
						display_ref,
						i + (display_idx * PLANES_PER_CRTC)
					       );
		if (IS_ERR(planes[i])) {
			dev_err(dev, "failed to construct plane\n");
			ret = PTR_ERR(planes[i]);
			goto err;
		}
	}

?

6by9 added 2 commits August 13, 2020 20:20
The number assigned was arbitrary as one primary, one overlay,
and one cursor.
The number has to be below the DRM limit of 32 planes total,
and the current firmware API limit of 16 planes total.

Increase the number to 8 planes per crtc (1 primary,
6 overlay, and a cursor).

Signed-off-by: Dave Stevenson <[email protected]>
The driver was assigning all planes to crtcs when actually they're
mapped to a specific crtc.

Correct the mask.

raspberrypi#3734

Signed-off-by: Dave Stevenson <[email protected]>
@6by9
Copy link
Contributor Author

6by9 commented Aug 13, 2020

Rebased and reworked so that the commits make more sense. Increase the number of planes, and then fix the possible_crtcs flags.

@pelwell
Copy link
Contributor

pelwell commented Aug 13, 2020

It's hard to argue with code like that.

@pelwell pelwell merged commit e3bb131 into raspberrypi:rpi-5.4.y Aug 13, 2020
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Aug 14, 2020
kernel: bcm2835_codec fixes
See: raspberrypi/linux#3790

kernel: FKMS - correct possible_crtcs flags, and increase the number of planes
See: raspberrypi/linux#3740

kernel: config: Add USB gadget support to bcm2711 config
kernel: overlays: Regenerate upstream-pi4
kernel: ARM: dts: Add required USB power domain for XCHI
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Aug 14, 2020
kernel: bcm2835_codec fixes
See: raspberrypi/linux#3790

kernel: FKMS - correct possible_crtcs flags, and increase the number of planes
See: raspberrypi/linux#3740

kernel: config: Add USB gadget support to bcm2711 config
kernel: overlays: Regenerate upstream-pi4
kernel: ARM: dts: Add required USB power domain for XCHI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants