Hi everyone,
After commit a7b9f9e5adef276c25584e28ce9e520045ff048b, dithering has
disappeared on LVDS (for those who needed it).
ThibG on IRC has bisected this behaviour to
a7b9f9e5adef276c25584e28ce9e520045ff048b. Here is a patch that
re-enables it.
Please comment on it.
Martin
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c
b/drivers/gpu/drm/nouveau/nouveau_connector.c
index d865707..f8cfab0 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -736,7 +736,8 @@ nouveau_connector_create(struct drm_device *dev,
struct nouveau_connector *nv_connector = NULL;
struct drm_connector *connector;
struct drm_encoder *encoder;
- int type;
+ bool dummy, if_is_24bit = false;
+ int ret, type;
NV_DEBUG_KMS(dev, "\n");
@@ -823,6 +824,20 @@ nouveau_connector_create(struct drm_device *dev,
drm_connector_attach_property(connector,
dev->mode_config.dvi_i_subconnector_property, 0);
drm_connector_attach_property(connector,
dev->mode_config.dvi_i_select_subconnector_property, 0);
}
+
+ /* Parse the LVDS table to get if it has a 24-bit link depth.
+ * If it hasn't, make use dithering to smooth shadings.
+ */
+ if (dcb->type == DCB_CONNECTOR_LVDS) {
+ ret = nouveau_bios_parse_lvds_table(dev, 0, &dummy,
&if_is_24bit);
+ if (ret) {
+ NV_ERROR(dev, "Error parsing LVDS table, disabling
LVDS\n");
+ drm_connector_cleanup(connector);
+ kfree(connector);
+ return 0;
+ }
+ nv_connector->use_dithering = !if_is_24bit;
+ }
switch (dcb->type) {
case DCB_CONNECTOR_VGA:
_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau