diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-07-01 13:04:40 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2009-08-19 02:06:40 -0400 |
commit | 53bd83899f5ba6b0da8f5ef976129273854a72d4 (patch) | |
tree | 267204f6162cd523235627898d50c91cf879fb20 /drivers | |
parent | 776f3360de6ed246e973577828f725681120fd7a (diff) |
drm: clarify scaling property names
Now that we're using the scaling property in the Intel driver I noticed
that the names were a bit confusing. I've corrected them according to
our discussion on IRC and the mailing list, though I've left out
potential new additions for a new scaling property with an integer (or
two) for the scaling factor. None of the drivers implement that today,
but if someone wants to do it, I think it could be done with the
addition of a single new type and a new property to describe the
scaling factor in the X and Y directions.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_lvds.c | 14 |
2 files changed, 7 insertions, 15 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 362a538cdedc..39a6bc69d223 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list) | |||
68 | */ | 68 | */ |
69 | static struct drm_prop_enum_list drm_scaling_mode_enum_list[] = | 69 | static struct drm_prop_enum_list drm_scaling_mode_enum_list[] = |
70 | { | 70 | { |
71 | { DRM_MODE_SCALE_NON_GPU, "Non-GPU" }, | 71 | { DRM_MODE_SCALE_NONE, "None" }, |
72 | { DRM_MODE_SCALE_FULLSCREEN, "Fullscreen" }, | 72 | { DRM_MODE_SCALE_FULLSCREEN, "Full" }, |
73 | { DRM_MODE_SCALE_NO_SCALE, "No scale" }, | 73 | { DRM_MODE_SCALE_CENTER, "Center" }, |
74 | { DRM_MODE_SCALE_ASPECT, "Aspect" }, | 74 | { DRM_MODE_SCALE_ASPECT, "Full aspect" }, |
75 | }; | 75 | }; |
76 | 76 | ||
77 | static struct drm_prop_enum_list drm_dithering_mode_enum_list[] = | 77 | static struct drm_prop_enum_list drm_dithering_mode_enum_list[] = |
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c index b59c65d19d81..5df486fbe056 100644 --- a/drivers/gpu/drm/i915/intel_lvds.c +++ b/drivers/gpu/drm/i915/intel_lvds.c | |||
@@ -38,14 +38,6 @@ | |||
38 | #include "i915_drv.h" | 38 | #include "i915_drv.h" |
39 | #include <linux/acpi.h> | 39 | #include <linux/acpi.h> |
40 | 40 | ||
41 | /* | ||
42 | * the following four scaling options are defined. | ||
43 | * #define DRM_MODE_SCALE_NON_GPU 0 | ||
44 | * #define DRM_MODE_SCALE_FULLSCREEN 1 | ||
45 | * #define DRM_MODE_SCALE_NO_SCALE 2 | ||
46 | * #define DRM_MODE_SCALE_ASPECT 3 | ||
47 | */ | ||
48 | |||
49 | /* Private structure for the integrated LVDS support */ | 41 | /* Private structure for the integrated LVDS support */ |
50 | struct intel_lvds_priv { | 42 | struct intel_lvds_priv { |
51 | int fitting_mode; | 43 | int fitting_mode; |
@@ -334,7 +326,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, | |||
334 | I915_WRITE(BCLRPAT_B, 0); | 326 | I915_WRITE(BCLRPAT_B, 0); |
335 | 327 | ||
336 | switch (lvds_priv->fitting_mode) { | 328 | switch (lvds_priv->fitting_mode) { |
337 | case DRM_MODE_SCALE_NO_SCALE: | 329 | case DRM_MODE_SCALE_CENTER: |
338 | /* | 330 | /* |
339 | * For centered modes, we have to calculate border widths & | 331 | * For centered modes, we have to calculate border widths & |
340 | * heights and modify the values programmed into the CRTC. | 332 | * heights and modify the values programmed into the CRTC. |
@@ -670,8 +662,8 @@ static int intel_lvds_set_property(struct drm_connector *connector, | |||
670 | connector->encoder) { | 662 | connector->encoder) { |
671 | struct drm_crtc *crtc = connector->encoder->crtc; | 663 | struct drm_crtc *crtc = connector->encoder->crtc; |
672 | struct intel_lvds_priv *lvds_priv = intel_output->dev_priv; | 664 | struct intel_lvds_priv *lvds_priv = intel_output->dev_priv; |
673 | if (value == DRM_MODE_SCALE_NON_GPU) { | 665 | if (value == DRM_MODE_SCALE_NONE) { |
674 | DRM_DEBUG_KMS("non_GPU property is unsupported\n"); | 666 | DRM_DEBUG_KMS("no scaling not supported\n"); |
675 | return 0; | 667 | return 0; |
676 | } | 668 | } |
677 | if (lvds_priv->fitting_mode == value) { | 669 | if (lvds_priv->fitting_mode == value) { |