-
Notifications
You must be signed in to change notification settings - Fork 5.3k
drm/vc4: Force trigger of dlist update on margins change #4970
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
Conversation
When the margins are changed, the dlist needs to be regenerated with the changed updated dest regions for each of the planes. Setting the zpos_changed flag is sufficient to trigger that without doing a full modeset, therefore set it should the margins be changed. Signed-off-by: Dave Stevenson <[email protected]>
|
LGTM |
drivers/gpu/drm/vc4/vc4_crtc.c
Outdated
| vc4_state->margins.bottom = conn_state->tv.margins.bottom; | ||
| if (memcmp(&conn_state->tv.margins, &vc4_state->margins, | ||
| sizeof(vc4_state->margins))) { | ||
| vc4_state->margins.left = conn_state->tv.margins.left; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you use memcpy for the update, since memcmp is used for comparison? If the margins structure were to include an extra field then you would potentially detect the need for an update but not actually change anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you do, swap the memcmp parameters so they match the memcpy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, happy to do that.
I only kept the old code to reduce the diff, but memcpy makes more sense.
|
Something like this? |
|
Observation about Github PR handling. |
|
Strange that I've not seen that happen before - perhaps something about your privacy settings? I'll fix the patch for 5.16 and 5.17. |
…#4970) When the margins are changed, the dlist needs to be regenerated with the changed updated dest regions for each of the planes. Setting the zpos_changed flag is sufficient to trigger that without doing a full modeset, therefore set it should the margins be changed. Signed-off-by: Dave Stevenson <[email protected]>
When the margins are changed, the dlist needs to be regenerated
with the changed updated dest regions for each of the planes.
Setting the zpos_changed flag is sufficient to trigger that
without doing a full modeset, therefore set it should the
margins be changed.
Signed-off-by: Dave Stevenson [email protected]
Requested by @spl237