-
Notifications
You must be signed in to change notification settings - Fork 5.2k
vc4-kms commits backported #3138
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Y_OFFSET field starts at bit 8 not 7. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
This is needed to support X/Y negative placement of planes using T-format buffers. Signed-off-by: Eric Anholt <[email protected]> Signed-off-by: Boris Brezillon <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drm_atomic_helper_check_plane_state() takes care of checking the scaling capabilities and calculating the clipped X/Y offsets for us. Rely on this function instead of open-coding the logic. Incidentally, it seems to fix a problem we had with negative X/Y positioning of YUV planes. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
The offset adjustment depends on the framebuffer modified, so let's just move this operation in the DRM_FORMAT_MOD_LINEAR case inside vc4_plane_mode_set(). This we'll be able to fix offset calculation for DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED and DRM_FORMAT_MOD_BROADCOM_SANDXXX. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
X/Y positioning of T-format buffers is quite tricky and the current implementation was failing to position a plane using this format correctly when the CRTC X, Y or both X and Y offsets were negative. It was also failing when the SRC X/Y offsets were != 0. Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
vc4_plane_atomic_async_update() calls vc4_plane_atomic_check() which in turn calls vc4_plane_setup_clipping_and_scaling(), and since commit 58a6a36 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic"), this function accesses plane_state->state which will be NULL when called from the async update path because we're passing the current plane state, and plane_state->state has been assigned to NULL in drm_atomic_helper_swap_state(). Pass the new state instead of the current one (the new state has ->state set to a non-NULL value). Fixes: 58a6a36 ("drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic") Signed-off-by: Boris Brezillon <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Aug 9, 2019
kernel: net: bcmgenet: Workaround #2 for Pi4 Ethernet fail See: raspberrypi/linux#3108 kernel: drm/vc4: Add missing NULL check to vc4_crtc_consume_event kernel: vc4-kms commits backported See: raspberrypi/linux#3138 firmware: AWB: Allow user to set manual gains for the RPi algorithm firmware: arm_loader: Fix disabling of audio before reboot firmware: fixed up the custom CVT values to use correct group firmware: hdmi: Add independent table entries for hdmi_timings on each display See: #1218
popcornmix
added a commit
to Hexxeh/rpi-firmware
that referenced
this pull request
Aug 9, 2019
kernel: net: bcmgenet: Workaround #2 for Pi4 Ethernet fail See: raspberrypi/linux#3108 kernel: drm/vc4: Add missing NULL check to vc4_crtc_consume_event kernel: vc4-kms commits backported See: raspberrypi/linux#3138 firmware: AWB: Allow user to set manual gains for the RPi algorithm firmware: arm_loader: Fix disabling of audio before reboot firmware: fixed up the custom CVT values to use correct group firmware: hdmi: Add independent table entries for hdmi_timings on each display See: raspberrypi/firmware#1218
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backporting a couple of commits from 5.0 so that the vc4-kms driver actually abides by the source rectangle specified on a plane.
Using the
dtoverlay=vc4-kms-kippah-7inch
just works on a Pi3, but dual screen in X doesn't allow you to move the displays around due to this issue.drm/vc4: Use drm_atomic_helper_check_plane_state() to simplify the logic
required minor conflict resolution as the margins backport had touched the same code.