summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_display.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-12-22 17:19:26 +1000
committerBen Skeggs <bskeggs@redhat.com>2015-01-22 12:14:58 +1000
commit576f79116ee8ed6f41f0f9f1fc295eaad5d5aeee (patch)
treeb0f3d34c3d389f9ae5b0a99b98c3f3d7ddb5007e /drivers/gpu/drm/nouveau/nv50_display.c
parenta91d322120a65ec5ada5518d948fda84aa87796f (diff)
downloadblackbird-obmc-linux-576f79116ee8ed6f41f0f9f1fc295eaad5d5aeee.tar.gz
blackbird-obmc-linux-576f79116ee8ed6f41f0f9f1fc295eaad5d5aeee.zip
drm/nv50-/kms: allow disabling of gpu scaling on fixed panels
The hilarious part is that, under X, this won't work anyway because the server decides to construct its own modes for some reason. Tested with modetest, which isn't quite as insane. I'd hope that wayland is more sensible. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_display.c24
1 files changed, 21 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 4f544f3683db..85cc667cfb0f 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -729,8 +729,11 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update)
* effectively handles NONE/FULL scaling
*/
nv_connector = nouveau_crtc_connector_get(nv_crtc);
- if (nv_connector && nv_connector->native_mode)
+ if (nv_connector && nv_connector->native_mode) {
mode = nv_connector->scaling_mode;
+ if (nv_connector->scaling_full) /* non-EDID LVDS/eDP mode */
+ mode = DRM_MODE_SCALE_FULLSCREEN;
+ }
if (mode != DRM_MODE_SCALE_NONE)
omode = nv_connector->native_mode;
@@ -1478,8 +1481,23 @@ nv50_encoder_mode_fixup(struct drm_encoder *encoder,
nv_connector = nouveau_encoder_connector_get(nv_encoder);
if (nv_connector && nv_connector->native_mode) {
- if (nv_connector->scaling_mode != DRM_MODE_SCALE_NONE)
- drm_mode_copy(adjusted_mode, nv_connector->native_mode);
+ nv_connector->scaling_full = false;
+ if (nv_connector->scaling_mode == DRM_MODE_SCALE_NONE) {
+ switch (nv_connector->type) {
+ case DCB_CONNECTOR_LVDS:
+ case DCB_CONNECTOR_LVDS_SPWG:
+ case DCB_CONNECTOR_eDP:
+ /* force use of scaler for non-edid modes */
+ if (adjusted_mode->type & DRM_MODE_TYPE_DRIVER)
+ return true;
+ nv_connector->scaling_full = true;
+ break;
+ default:
+ return true;
+ }
+ }
+
+ drm_mode_copy(adjusted_mode, nv_connector->native_mode);
}
return true;
OpenPOWER on IntegriCloud