From: Martin Peres <martin.peres-Iz16wY1oaNPLSKGbIzaifA@public.gmane.org>
To: nouveau <Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re-enable dithering after commit a7b9f9e5adef276c25584e28ce9e520045ff048b
Date: Wed, 16 Jun 2010 09:38:28 +0200 [thread overview]
Message-ID: <4C187F74.4040402@ensi-bourges.fr> (raw)
[-- 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
next reply other threads:[~2010-06-16 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-16 7:38 Martin Peres [this message]
[not found] ` <4C187F74.4040402-Iz16wY1oaNPLSKGbIzaifA@public.gmane.org>
2010-06-16 17:24 ` Re-enable dithering after commit a7b9f9e5adef276c25584e28ce9e520045ff048b 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C187F74.4040402@ensi-bourges.fr \
--to=martin.peres-iz16wy1oanplskgbizaifa@public.gmane.org \
--cc=Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.