dfp.c (976e3645923bdd2fe7893aae33fd7a21098bfb28) | dfp.c (09838c4efe9afb6fefa889d92c3571d49029af26) |
---|---|
1/* 2 * Copyright 2003 NVIDIA, Corporation 3 * Copyright 2006 Dave Airlie 4 * Copyright 2007 Maarten Maathuis 5 * Copyright 2007-2009 Stuart Bennett 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), --- 170 unchanged lines hidden (view full) --- 179 return NULL; 180} 181 182static bool nv04_dfp_mode_fixup(struct drm_encoder *encoder, 183 const struct drm_display_mode *mode, 184 struct drm_display_mode *adjusted_mode) 185{ 186 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); | 1/* 2 * Copyright 2003 NVIDIA, Corporation 3 * Copyright 2006 Dave Airlie 4 * Copyright 2007 Maarten Maathuis 5 * Copyright 2007-2009 Stuart Bennett 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining a 8 * copy of this software and associated documentation files (the "Software"), --- 170 unchanged lines hidden (view full) --- 179 return NULL; 180} 181 182static bool nv04_dfp_mode_fixup(struct drm_encoder *encoder, 183 const struct drm_display_mode *mode, 184 struct drm_display_mode *adjusted_mode) 185{ 186 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); |
187 struct nouveau_connector *nv_connector = nouveau_encoder_connector_get(nv_encoder); | 187 struct nouveau_connector *nv_connector = 188 nv04_encoder_get_connector(nv_encoder); |
188 189 if (!nv_connector->native_mode || 190 nv_connector->scaling_mode == DRM_MODE_SCALE_NONE || 191 mode->hdisplay > nv_connector->native_mode->hdisplay || 192 mode->vdisplay > nv_connector->native_mode->vdisplay) { 193 nv_encoder->mode = *adjusted_mode; 194 195 } else { --- 277 unchanged lines hidden (view full) --- 473 slave_encoder = get_tmds_slave(encoder); 474 if (slave_encoder) 475 get_slave_funcs(slave_encoder)->mode_set( 476 slave_encoder, &nv_encoder->mode, &nv_encoder->mode); 477 478 helper->dpms(encoder, DRM_MODE_DPMS_ON); 479 480 NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", | 189 190 if (!nv_connector->native_mode || 191 nv_connector->scaling_mode == DRM_MODE_SCALE_NONE || 192 mode->hdisplay > nv_connector->native_mode->hdisplay || 193 mode->vdisplay > nv_connector->native_mode->vdisplay) { 194 nv_encoder->mode = *adjusted_mode; 195 196 } else { --- 277 unchanged lines hidden (view full) --- 474 slave_encoder = get_tmds_slave(encoder); 475 if (slave_encoder) 476 get_slave_funcs(slave_encoder)->mode_set( 477 slave_encoder, &nv_encoder->mode, &nv_encoder->mode); 478 479 helper->dpms(encoder, DRM_MODE_DPMS_ON); 480 481 NV_DEBUG(drm, "Output %s is running on CRTC %d using output %c\n", |
481 nouveau_encoder_connector_get(nv_encoder)->base.name, | 482 nv04_encoder_get_connector(nv_encoder)->base.name, |
482 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); 483} 484 485static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode) 486{ 487#ifdef __powerpc__ 488 struct drm_device *dev = encoder->dev; 489 struct nvif_object *device = &nouveau_drm(dev)->client.device.object; --- 96 unchanged lines hidden (view full) --- 586static void nv04_dfp_restore(struct drm_encoder *encoder) 587{ 588 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 589 struct drm_device *dev = encoder->dev; 590 int head = nv_encoder->restore.head; 591 592 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) { 593 struct nouveau_connector *connector = | 483 nv_crtc->index, '@' + ffs(nv_encoder->dcb->or)); 484} 485 486static void nv04_dfp_update_backlight(struct drm_encoder *encoder, int mode) 487{ 488#ifdef __powerpc__ 489 struct drm_device *dev = encoder->dev; 490 struct nvif_object *device = &nouveau_drm(dev)->client.device.object; --- 96 unchanged lines hidden (view full) --- 587static void nv04_dfp_restore(struct drm_encoder *encoder) 588{ 589 struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder); 590 struct drm_device *dev = encoder->dev; 591 int head = nv_encoder->restore.head; 592 593 if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS) { 594 struct nouveau_connector *connector = |
594 nouveau_encoder_connector_get(nv_encoder); | 595 nv04_encoder_get_connector(nv_encoder); |
595 596 if (connector && connector->native_mode) 597 call_lvds_script(dev, nv_encoder->dcb, head, 598 LVDS_PANEL_ON, 599 connector->native_mode->clock); 600 601 } else if (nv_encoder->dcb->type == DCB_OUTPUT_TMDS) { 602 int clock = nouveau_hw_pllvals_to_clk --- 119 unchanged lines hidden --- | 596 597 if (connector && connector->native_mode) 598 call_lvds_script(dev, nv_encoder->dcb, head, 599 LVDS_PANEL_ON, 600 connector->native_mode->clock); 601 602 } else if (nv_encoder->dcb->type == DCB_OUTPUT_TMDS) { 603 int clock = nouveau_hw_pllvals_to_clk --- 119 unchanged lines hidden --- |