Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218235
b: refs/heads/master
c: 62acdc7
h: refs/heads/master
i:
  218233: e9f795b
  218231: 304b6d8
v: v3
  • Loading branch information
Ben Skeggs committed Oct 4, 2010
1 parent 5e1ae75 commit 5339b97
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 85341f27b49833325f97580edcd687b4d90bb30b
refs/heads/master: 62acdc71cfbc816b26a57d89f433f8afaf4ff78d
18 changes: 17 additions & 1 deletion trunk/drivers/gpu/drm/nouveau/nouveau_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,22 @@ nouveau_encoder_connector_get(struct nouveau_encoder *encoder)
return NULL;
}

/*TODO: This could use improvement, and learn to handle the fixed
* BIOS tables etc. It's fine currently, for its only user.
*/
int
nouveau_connector_bpp(struct drm_connector *connector)
{
struct nouveau_connector *nv_connector = nouveau_connector(connector);

if (nv_connector->edid && nv_connector->edid->revision >= 4) {
u8 bpc = ((nv_connector->edid->input & 0x70) >> 3) + 4;
if (bpc > 4)
return bpc;
}

return 18;
}

static void
nouveau_connector_destroy(struct drm_connector *drm_connector)
Expand Down Expand Up @@ -666,7 +682,7 @@ nouveau_connector_mode_valid(struct drm_connector *connector,
else
max_clock = nv_encoder->dp.link_nr * 162000;

clock *= 3;
clock = clock * nouveau_connector_bpp(connector) / 8;
break;
default:
BUG_ON(1);
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/gpu/drm/nouveau/nouveau_connector.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ nouveau_connector_create(struct drm_device *, int index);
void
nouveau_connector_set_polling(struct drm_connector *);

int
nouveau_connector_bpp(struct drm_connector *);

#endif /* __NOUVEAU_CONNECTOR_H__ */

0 comments on commit 5339b97

Please sign in to comment.