Commit 53bd8389 authored by Jesse Barnes's avatar Jesse Barnes Committed by Dave Airlie

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: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Acked-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 776f3360
...@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list) ...@@ -68,10 +68,10 @@ DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list)
*/ */
static struct drm_prop_enum_list drm_scaling_mode_enum_list[] = static struct drm_prop_enum_list drm_scaling_mode_enum_list[] =
{ {
{ DRM_MODE_SCALE_NON_GPU, "Non-GPU" }, { DRM_MODE_SCALE_NONE, "None" },
{ DRM_MODE_SCALE_FULLSCREEN, "Fullscreen" }, { DRM_MODE_SCALE_FULLSCREEN, "Full" },
{ DRM_MODE_SCALE_NO_SCALE, "No scale" }, { DRM_MODE_SCALE_CENTER, "Center" },
{ DRM_MODE_SCALE_ASPECT, "Aspect" }, { DRM_MODE_SCALE_ASPECT, "Full aspect" },
}; };
static struct drm_prop_enum_list drm_dithering_mode_enum_list[] = static struct drm_prop_enum_list drm_dithering_mode_enum_list[] =
......
...@@ -38,14 +38,6 @@ ...@@ -38,14 +38,6 @@
#include "i915_drv.h" #include "i915_drv.h"
#include <linux/acpi.h> #include <linux/acpi.h>
/*
* the following four scaling options are defined.
* #define DRM_MODE_SCALE_NON_GPU 0
* #define DRM_MODE_SCALE_FULLSCREEN 1
* #define DRM_MODE_SCALE_NO_SCALE 2
* #define DRM_MODE_SCALE_ASPECT 3
*/
/* Private structure for the integrated LVDS support */ /* Private structure for the integrated LVDS support */
struct intel_lvds_priv { struct intel_lvds_priv {
int fitting_mode; int fitting_mode;
...@@ -334,7 +326,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder, ...@@ -334,7 +326,7 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
I915_WRITE(BCLRPAT_B, 0); I915_WRITE(BCLRPAT_B, 0);
switch (lvds_priv->fitting_mode) { switch (lvds_priv->fitting_mode) {
case DRM_MODE_SCALE_NO_SCALE: case DRM_MODE_SCALE_CENTER:
/* /*
* For centered modes, we have to calculate border widths & * For centered modes, we have to calculate border widths &
* heights and modify the values programmed into the CRTC. * heights and modify the values programmed into the CRTC.
...@@ -670,8 +662,8 @@ static int intel_lvds_set_property(struct drm_connector *connector, ...@@ -670,8 +662,8 @@ static int intel_lvds_set_property(struct drm_connector *connector,
connector->encoder) { connector->encoder) {
struct drm_crtc *crtc = connector->encoder->crtc; struct drm_crtc *crtc = connector->encoder->crtc;
struct intel_lvds_priv *lvds_priv = intel_output->dev_priv; struct intel_lvds_priv *lvds_priv = intel_output->dev_priv;
if (value == DRM_MODE_SCALE_NON_GPU) { if (value == DRM_MODE_SCALE_NONE) {
DRM_DEBUG_KMS("non_GPU property is unsupported\n"); DRM_DEBUG_KMS("no scaling not supported\n");
return 0; return 0;
} }
if (lvds_priv->fitting_mode == value) { if (lvds_priv->fitting_mode == value) {
......
...@@ -68,10 +68,11 @@ ...@@ -68,10 +68,11 @@
#define DRM_MODE_DPMS_OFF 3 #define DRM_MODE_DPMS_OFF 3
/* Scaling mode options */ /* Scaling mode options */
#define DRM_MODE_SCALE_NON_GPU 0 #define DRM_MODE_SCALE_NONE 0 /* Unmodified timing (display or
#define DRM_MODE_SCALE_FULLSCREEN 1 software can still scale) */
#define DRM_MODE_SCALE_NO_SCALE 2 #define DRM_MODE_SCALE_FULLSCREEN 1 /* Full screen, ignore aspect */
#define DRM_MODE_SCALE_ASPECT 3 #define DRM_MODE_SCALE_CENTER 2 /* Centered, no scaling */
#define DRM_MODE_SCALE_ASPECT 3 /* Full screen, preserve aspect */
/* Dithering mode options */ /* Dithering mode options */
#define DRM_MODE_DITHERING_OFF 0 #define DRM_MODE_DITHERING_OFF 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment