Skip to contentSkip to conversation

Re-enable dithering after commit a7b9f9e5adef276c25584e28ce9e520045ff048b

PATCH Martin Peres 3 participants 4 messages Jun 16, 2010 – Jun 17, 2010 3 messages not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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

drivers/gpu/drm/nouveau/nouveau_connector.c +16 -1
index d865707..f8cfab0 100644
@@ -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

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 9 lines · Martin Peres

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

Well, too late, Jerez already pushed a patch to do that :)

Do you have any idea of why it took almost 10 hours between the moment I sent this mail and the moment I actually received it from the list ? Is there a manual approbation somewhere to get rid of the spam ?

Thanks to Jerez for the patch anyway :) It works just as great and is better designed.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw
Quoted 13 lines · Martin Peres

Le 16/06/2010 09:38, Martin Peres a écrit :

Hi everyone,

Quoted 10 lines

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.

Quoted 8 lines
Quoted 2 lines

Martin

Well, too late, Jerez already pushed a patch to do that :)

Do you have any idea of why it took almost 10 hours between the moment I sent this mail and the moment I actually received it from the list ? Is there a manual approbation somewhere to get rid of the spam ?

Yes, because you're not subscribed to the list.

Stephane

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): AANLkTin383_xfgGamabXVUHaE2DA7pG5wLNa7VW574Ob-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw
Quoted 11 lines · Stephane Marchesin

On Wed, Jun 16, 2010 at 10:24, Martin Peres <[email protected] <mailto:[email protected]>> wrote:

Do you have any idea of why it took almost 10 hours between the moment I sent this mail and the moment I actually received it from the list ? Is there a manual approbation somewhere to get rid of the spam ?

Quoted 3 lines

Yes, because you're not subscribed to the list.

Stephane

Woops, used the wrong adress, my bad ...

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau