Skip to content

Conversation

@6by9
Copy link
Contributor

@6by9 6by9 commented Mar 31, 2022

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

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]>
@popcornmix
Copy link
Collaborator

LGTM

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;
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@pelwell
Copy link
Contributor

pelwell commented Apr 1, 2022

Something like this?

@pelwell pelwell merged commit ddd39a7 into raspberrypi:rpi-5.15.y Apr 1, 2022
@6by9
Copy link
Contributor Author

6by9 commented Apr 1, 2022

Observation about Github PR handling.
I'm guessing you did a squash merge in accepting the PR. That appears to have reset the author of the patch to 6by9 <[email protected]>. Not a big deal, but makes things more awkward if upstreaming.

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Apr 1, 2022
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Apr 1, 2022
@pelwell
Copy link
Contributor

pelwell commented Apr 1, 2022

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.

Noltari pushed a commit to Noltari/rpi-linux that referenced this pull request May 17, 2022
…#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]>
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.

3 participants