mirror of https://gitee.com/openkylin/linux.git
drm/nv04-nv40: Fall back to panel rescaling if we have no usable native mode.
This allows the user to set a mode larger than the native one, useful if we had trouble finding the actual native mode (e.g. because it goes above the hardware bandwidth limits). Reported-by: Grzesiek Sójka <pld@pfu.pl> Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
1f5bd44354
commit
327ceae664
|
@ -185,14 +185,15 @@ static bool nv04_dfp_mode_fixup(struct drm_encoder *encoder,
|
|||
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
|
||||
struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder);
|
||||
|
||||
/* For internal panels and gpu scaling on DVI we need the native mode */
|
||||
if (nv_connector->scaling_mode != DRM_MODE_SCALE_NONE) {
|
||||
if (!nv_connector->native_mode)
|
||||
return false;
|
||||
if (!nv_connector->native_mode ||
|
||||
nv_connector->scaling_mode == DRM_MODE_SCALE_NONE ||
|
||||
mode->hdisplay > nv_connector->native_mode->hdisplay ||
|
||||
mode->vdisplay > nv_connector->native_mode->vdisplay) {
|
||||
nv_encoder->mode = *adjusted_mode;
|
||||
|
||||
} else {
|
||||
nv_encoder->mode = *nv_connector->native_mode;
|
||||
adjusted_mode->clock = nv_connector->native_mode->clock;
|
||||
} else {
|
||||
nv_encoder->mode = *adjusted_mode;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue