All of lore.kernel.org
 help / color / mirror / Atom feed
* Re-enable dithering after commit a7b9f9e5adef276c25584e28ce9e520045ff048b
@ 2010-06-16  7:38 Martin Peres
       [not found] ` <4C187F74.4040402-Iz16wY1oaNPLSKGbIzaifA@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Martin Peres @ 2010-06-16  7:38 UTC (permalink / raw)
  To: nouveau

[-- Attachment #1: Type: text/plain, Size: 287 bytes --]

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

[-- Attachment #2: re-enable_dithering_on_less_than_24bits_lvds_v2.path --]
[-- Type: text/plain, Size: 1281 bytes --]

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:

[-- Attachment #3: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-06-17 19:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-16  7:38 Re-enable dithering after commit a7b9f9e5adef276c25584e28ce9e520045ff048b Martin Peres
     [not found] ` <4C187F74.4040402-Iz16wY1oaNPLSKGbIzaifA@public.gmane.org>
2010-06-16 17:24   ` Martin Peres
     [not found]     ` <4C1908B3.2060201-Iz16wY1oaNPLSKGbIzaifA@public.gmane.org>
2010-06-17 19:36       ` Stephane Marchesin
     [not found]         ` <AANLkTin383_xfgGamabXVUHaE2DA7pG5wLNa7VW574Ob-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-06-17 19:49           ` Martin Peres

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.