diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 10:19:26 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-01-22 05:14:58 +0300 |
commit | 576f79116ee8ed6f41f0f9f1fc295eaad5d5aeee (patch) | |
tree | b0f3d34c3d389f9ae5b0a99b98c3f3d7ddb5007e /drivers/gpu/drm/nouveau/nouveau_connector.c | |
parent | a91d322120a65ec5ada5518d948fda84aa87796f (diff) | |
download | linux-576f79116ee8ed6f41f0f9f1fc295eaad5d5aeee.tar.xz |
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/nouveau_connector.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index c8ac9482cf2e..d13f50db765d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -458,6 +458,28 @@ nouveau_connector_set_property(struct drm_connector *connector, switch (value) { case DRM_MODE_SCALE_NONE: + /* We allow 'None' for EDID modes, even on a fixed + * panel (some exist with support for lower refresh + * rates, which people might want to use for power + * saving purposes). + * + * Non-EDID modes will force the use of GPU scaling + * to the native mode regardless of this setting. + */ + switch (nv_connector->type) { + case DCB_CONNECTOR_LVDS: + case DCB_CONNECTOR_LVDS_SPWG: + case DCB_CONNECTOR_eDP: + /* ... except prior to G80, where the code + * doesn't support such things. + */ + if (disp->disp.oclass < NV50_DISP) + return -EINVAL; + break; + default: + break; + } + break; case DRM_MODE_SCALE_FULLSCREEN: case DRM_MODE_SCALE_CENTER: case DRM_MODE_SCALE_ASPECT: @@ -466,11 +488,6 @@ nouveau_connector_set_property(struct drm_connector *connector, return -EINVAL; } - /* LVDS always needs gpu scaling */ - if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS && - value == DRM_MODE_SCALE_NONE) - return -EINVAL; - /* Changing between GPU and panel scaling requires a full * modeset */ @@ -662,8 +679,6 @@ nouveau_connector_scaler_modes_add(struct drm_connector *connector) if (!m) continue; - m->type |= DRM_MODE_TYPE_DRIVER; - drm_mode_probed_add(connector, m); modes++; } |