Skip to content
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

DRM fixes #5716

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions drivers/gpu/drm/bridge/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ config DRM_CROS_EC_ANX7688
config DRM_DISPLAY_CONNECTOR
tristate "Display connector support"
depends on OF
select DRM_KMS_HELPER
help
Driver for display connectors with support for DDC and hot-plug
detection. Most display controllers handle display connectors
Expand Down
15 changes: 15 additions & 0 deletions drivers/gpu/drm/vc4/vc4_plane.c
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,12 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
width = vc4_state->src_w[0] >> 16;
height = vc4_state->src_h[0] >> 16;

if (!width || !height) {
/* 0 source size probably means the plane is offscreen */
vc4_state->dlist_initialized = 1;
return 0;
}

/* SCL1 is used for Cb/Cr scaling of planar formats. For RGB
* and 4:4:4, scl1 should be set to scl0 so both channels of
* the scaler do the same thing. For YUV, the Y plane needs
Expand Down Expand Up @@ -1623,6 +1629,12 @@ static int vc6_plane_mode_set(struct drm_plane *plane,
width = vc4_state->src_w[0] >> 16;
height = vc4_state->src_h[0] >> 16;

if (!width || !height) {
/* 0 source size probably means the plane is offscreen */
vc4_state->dlist_initialized = 1;
return 0;
}

/* SCL1 is used for Cb/Cr scaling of planar formats. For RGB
* and 4:4:4, scl1 should be set to scl0 so both channels of
* the scaler do the same thing. For YUV, the Y plane needs
Expand Down Expand Up @@ -1994,6 +2006,9 @@ int vc4_plane_atomic_check(struct drm_plane *plane,
if (ret)
return ret;

if (!vc4_state->src_w[0] || !vc4_state->src_h[0])
return 0;

ret = vc4_plane_allocate_lbm(new_plane_state);
if (ret)
return ret;
Expand Down