diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2014-03-18 20:22:55 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-19 08:03:54 -0400 |
commit | 262ca2b08fbdb9346e66ef30424b2226a00e0ffc (patch) | |
tree | 158f1af506dd0ec088194ad4228f7c5939f5fa44 /drivers/gpu/drm/i915/intel_display.c | |
parent | 11ea8b7d3e9b5d62217fbd12d66866172e187f9b (diff) |
drm/i915: Rename similar plane functions to avoid confusion
The name 'update_plane' was used both for the primary plane functions in
intel_display.c and the sprite/overlay functions in intel_sprite.c.
Rename the primary plane functions to 'update_primary_plane' to avoid
confusion.
On a similar note, intel_display.c already had a function called
intel_disable_primary_plane() that programs the hardware to disable a
pipe's primary plane. When we hook up primary planes through the DRM
plane interface, one of the natural handler names will be
intel_primary_plane_disable(), which is very similar. To avoid
confusion, rename the existing intel_disable_primary_plane() to
intel_disable_primary_hw_plane() to make the two names a little more
distinct.
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
[danvet: Fix up conflicts.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 58 |
1 files changed, 33 insertions, 25 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ffb0b632b779..796054f1cf84 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -1872,15 +1872,15 @@ void intel_flush_primary_plane(struct drm_i915_private *dev_priv, | |||
1872 | } | 1872 | } |
1873 | 1873 | ||
1874 | /** | 1874 | /** |
1875 | * intel_enable_primary_plane - enable the primary plane on a given pipe | 1875 | * intel_enable_primary_hw_plane - enable the primary plane on a given pipe |
1876 | * @dev_priv: i915 private structure | 1876 | * @dev_priv: i915 private structure |
1877 | * @plane: plane to enable | 1877 | * @plane: plane to enable |
1878 | * @pipe: pipe being fed | 1878 | * @pipe: pipe being fed |
1879 | * | 1879 | * |
1880 | * Enable @plane on @pipe, making sure that @pipe is running first. | 1880 | * Enable @plane on @pipe, making sure that @pipe is running first. |
1881 | */ | 1881 | */ |
1882 | static void intel_enable_primary_plane(struct drm_i915_private *dev_priv, | 1882 | static void intel_enable_primary_hw_plane(struct drm_i915_private *dev_priv, |
1883 | enum plane plane, enum pipe pipe) | 1883 | enum plane plane, enum pipe pipe) |
1884 | { | 1884 | { |
1885 | struct intel_crtc *intel_crtc = | 1885 | struct intel_crtc *intel_crtc = |
1886 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); | 1886 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); |
@@ -1905,15 +1905,15 @@ static void intel_enable_primary_plane(struct drm_i915_private *dev_priv, | |||
1905 | } | 1905 | } |
1906 | 1906 | ||
1907 | /** | 1907 | /** |
1908 | * intel_disable_primary_plane - disable the primary plane | 1908 | * intel_disable_primary_hw_plane - disable the primary hardware plane |
1909 | * @dev_priv: i915 private structure | 1909 | * @dev_priv: i915 private structure |
1910 | * @plane: plane to disable | 1910 | * @plane: plane to disable |
1911 | * @pipe: pipe consuming the data | 1911 | * @pipe: pipe consuming the data |
1912 | * | 1912 | * |
1913 | * Disable @plane; should be an independent operation. | 1913 | * Disable @plane; should be an independent operation. |
1914 | */ | 1914 | */ |
1915 | static void intel_disable_primary_plane(struct drm_i915_private *dev_priv, | 1915 | static void intel_disable_primary_hw_plane(struct drm_i915_private *dev_priv, |
1916 | enum plane plane, enum pipe pipe) | 1916 | enum plane plane, enum pipe pipe) |
1917 | { | 1917 | { |
1918 | struct intel_crtc *intel_crtc = | 1918 | struct intel_crtc *intel_crtc = |
1919 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); | 1919 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[pipe]); |
@@ -2152,8 +2152,9 @@ static void intel_find_plane_obj(struct intel_crtc *intel_crtc, | |||
2152 | } | 2152 | } |
2153 | } | 2153 | } |
2154 | 2154 | ||
2155 | static int i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb, | 2155 | static int i9xx_update_primary_plane(struct drm_crtc *crtc, |
2156 | int x, int y) | 2156 | struct drm_framebuffer *fb, |
2157 | int x, int y) | ||
2157 | { | 2158 | { |
2158 | struct drm_device *dev = crtc->dev; | 2159 | struct drm_device *dev = crtc->dev; |
2159 | struct drm_i915_private *dev_priv = dev->dev_private; | 2160 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -2252,8 +2253,9 @@ static int i9xx_update_plane(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
2252 | return 0; | 2253 | return 0; |
2253 | } | 2254 | } |
2254 | 2255 | ||
2255 | static int ironlake_update_plane(struct drm_crtc *crtc, | 2256 | static int ironlake_update_primary_plane(struct drm_crtc *crtc, |
2256 | struct drm_framebuffer *fb, int x, int y) | 2257 | struct drm_framebuffer *fb, |
2258 | int x, int y) | ||
2257 | { | 2259 | { |
2258 | struct drm_device *dev = crtc->dev; | 2260 | struct drm_device *dev = crtc->dev; |
2259 | struct drm_i915_private *dev_priv = dev->dev_private; | 2261 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -2357,7 +2359,7 @@ intel_pipe_set_base_atomic(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
2357 | dev_priv->display.disable_fbc(dev); | 2359 | dev_priv->display.disable_fbc(dev); |
2358 | intel_increase_pllclock(crtc); | 2360 | intel_increase_pllclock(crtc); |
2359 | 2361 | ||
2360 | return dev_priv->display.update_plane(crtc, fb, x, y); | 2362 | return dev_priv->display.update_primary_plane(crtc, fb, x, y); |
2361 | } | 2363 | } |
2362 | 2364 | ||
2363 | void intel_display_handle_reset(struct drm_device *dev) | 2365 | void intel_display_handle_reset(struct drm_device *dev) |
@@ -2397,8 +2399,10 @@ void intel_display_handle_reset(struct drm_device *dev) | |||
2397 | * a NULL crtc->fb. | 2399 | * a NULL crtc->fb. |
2398 | */ | 2400 | */ |
2399 | if (intel_crtc->active && crtc->fb) | 2401 | if (intel_crtc->active && crtc->fb) |
2400 | dev_priv->display.update_plane(crtc, crtc->fb, | 2402 | dev_priv->display.update_primary_plane(crtc, |
2401 | crtc->x, crtc->y); | 2403 | crtc->fb, |
2404 | crtc->x, | ||
2405 | crtc->y); | ||
2402 | mutex_unlock(&crtc->mutex); | 2406 | mutex_unlock(&crtc->mutex); |
2403 | } | 2407 | } |
2404 | } | 2408 | } |
@@ -2514,7 +2518,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y, | |||
2514 | intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay; | 2518 | intel_crtc->config.pipe_src_h = adjusted_mode->crtc_vdisplay; |
2515 | } | 2519 | } |
2516 | 2520 | ||
2517 | ret = dev_priv->display.update_plane(crtc, fb, x, y); | 2521 | ret = dev_priv->display.update_primary_plane(crtc, fb, x, y); |
2518 | if (ret) { | 2522 | if (ret) { |
2519 | mutex_lock(&dev->struct_mutex); | 2523 | mutex_lock(&dev->struct_mutex); |
2520 | intel_unpin_fb_obj(to_intel_framebuffer(fb)->obj); | 2524 | intel_unpin_fb_obj(to_intel_framebuffer(fb)->obj); |
@@ -3695,7 +3699,7 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) | |||
3695 | 3699 | ||
3696 | intel_update_watermarks(crtc); | 3700 | intel_update_watermarks(crtc); |
3697 | intel_enable_pipe(intel_crtc); | 3701 | intel_enable_pipe(intel_crtc); |
3698 | intel_enable_primary_plane(dev_priv, plane, pipe); | 3702 | intel_enable_primary_hw_plane(dev_priv, plane, pipe); |
3699 | intel_enable_planes(crtc); | 3703 | intel_enable_planes(crtc); |
3700 | intel_crtc_update_cursor(crtc, true); | 3704 | intel_crtc_update_cursor(crtc, true); |
3701 | 3705 | ||
@@ -3737,7 +3741,7 @@ static void haswell_crtc_enable_planes(struct drm_crtc *crtc) | |||
3737 | int pipe = intel_crtc->pipe; | 3741 | int pipe = intel_crtc->pipe; |
3738 | int plane = intel_crtc->plane; | 3742 | int plane = intel_crtc->plane; |
3739 | 3743 | ||
3740 | intel_enable_primary_plane(dev_priv, plane, pipe); | 3744 | intel_enable_primary_hw_plane(dev_priv, plane, pipe); |
3741 | intel_enable_planes(crtc); | 3745 | intel_enable_planes(crtc); |
3742 | intel_crtc_update_cursor(crtc, true); | 3746 | intel_crtc_update_cursor(crtc, true); |
3743 | 3747 | ||
@@ -3767,7 +3771,7 @@ static void haswell_crtc_disable_planes(struct drm_crtc *crtc) | |||
3767 | 3771 | ||
3768 | intel_crtc_update_cursor(crtc, false); | 3772 | intel_crtc_update_cursor(crtc, false); |
3769 | intel_disable_planes(crtc); | 3773 | intel_disable_planes(crtc); |
3770 | intel_disable_primary_plane(dev_priv, plane, pipe); | 3774 | intel_disable_primary_hw_plane(dev_priv, plane, pipe); |
3771 | } | 3775 | } |
3772 | 3776 | ||
3773 | /* | 3777 | /* |
@@ -3895,7 +3899,7 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) | |||
3895 | 3899 | ||
3896 | intel_crtc_update_cursor(crtc, false); | 3900 | intel_crtc_update_cursor(crtc, false); |
3897 | intel_disable_planes(crtc); | 3901 | intel_disable_planes(crtc); |
3898 | intel_disable_primary_plane(dev_priv, plane, pipe); | 3902 | intel_disable_primary_hw_plane(dev_priv, plane, pipe); |
3899 | 3903 | ||
3900 | if (intel_crtc->config.has_pch_encoder) | 3904 | if (intel_crtc->config.has_pch_encoder) |
3901 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); | 3905 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); |
@@ -4378,7 +4382,7 @@ static void valleyview_crtc_enable(struct drm_crtc *crtc) | |||
4378 | intel_update_watermarks(crtc); | 4382 | intel_update_watermarks(crtc); |
4379 | intel_enable_pipe(intel_crtc); | 4383 | intel_enable_pipe(intel_crtc); |
4380 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); | 4384 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); |
4381 | intel_enable_primary_plane(dev_priv, plane, pipe); | 4385 | intel_enable_primary_hw_plane(dev_priv, plane, pipe); |
4382 | intel_enable_planes(crtc); | 4386 | intel_enable_planes(crtc); |
4383 | intel_crtc_update_cursor(crtc, true); | 4387 | intel_crtc_update_cursor(crtc, true); |
4384 | 4388 | ||
@@ -4417,7 +4421,7 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc) | |||
4417 | intel_update_watermarks(crtc); | 4421 | intel_update_watermarks(crtc); |
4418 | intel_enable_pipe(intel_crtc); | 4422 | intel_enable_pipe(intel_crtc); |
4419 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); | 4423 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, true); |
4420 | intel_enable_primary_plane(dev_priv, plane, pipe); | 4424 | intel_enable_primary_hw_plane(dev_priv, plane, pipe); |
4421 | intel_enable_planes(crtc); | 4425 | intel_enable_planes(crtc); |
4422 | /* The fixup needs to happen before cursor is enabled */ | 4426 | /* The fixup needs to happen before cursor is enabled */ |
4423 | if (IS_G4X(dev)) | 4427 | if (IS_G4X(dev)) |
@@ -4473,7 +4477,7 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) | |||
4473 | intel_crtc_dpms_overlay(intel_crtc, false); | 4477 | intel_crtc_dpms_overlay(intel_crtc, false); |
4474 | intel_crtc_update_cursor(crtc, false); | 4478 | intel_crtc_update_cursor(crtc, false); |
4475 | intel_disable_planes(crtc); | 4479 | intel_disable_planes(crtc); |
4476 | intel_disable_primary_plane(dev_priv, plane, pipe); | 4480 | intel_disable_primary_hw_plane(dev_priv, plane, pipe); |
4477 | 4481 | ||
4478 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, false); | 4482 | intel_set_cpu_fifo_underrun_reporting(dev, pipe, false); |
4479 | intel_disable_pipe(dev_priv, pipe); | 4483 | intel_disable_pipe(dev_priv, pipe); |
@@ -11018,7 +11022,8 @@ static void intel_init_display(struct drm_device *dev) | |||
11018 | dev_priv->display.crtc_enable = haswell_crtc_enable; | 11022 | dev_priv->display.crtc_enable = haswell_crtc_enable; |
11019 | dev_priv->display.crtc_disable = haswell_crtc_disable; | 11023 | dev_priv->display.crtc_disable = haswell_crtc_disable; |
11020 | dev_priv->display.off = haswell_crtc_off; | 11024 | dev_priv->display.off = haswell_crtc_off; |
11021 | dev_priv->display.update_plane = ironlake_update_plane; | 11025 | dev_priv->display.update_primary_plane = |
11026 | ironlake_update_primary_plane; | ||
11022 | } else if (HAS_PCH_SPLIT(dev)) { | 11027 | } else if (HAS_PCH_SPLIT(dev)) { |
11023 | dev_priv->display.get_pipe_config = ironlake_get_pipe_config; | 11028 | dev_priv->display.get_pipe_config = ironlake_get_pipe_config; |
11024 | dev_priv->display.get_plane_config = ironlake_get_plane_config; | 11029 | dev_priv->display.get_plane_config = ironlake_get_plane_config; |
@@ -11026,7 +11031,8 @@ static void intel_init_display(struct drm_device *dev) | |||
11026 | dev_priv->display.crtc_enable = ironlake_crtc_enable; | 11031 | dev_priv->display.crtc_enable = ironlake_crtc_enable; |
11027 | dev_priv->display.crtc_disable = ironlake_crtc_disable; | 11032 | dev_priv->display.crtc_disable = ironlake_crtc_disable; |
11028 | dev_priv->display.off = ironlake_crtc_off; | 11033 | dev_priv->display.off = ironlake_crtc_off; |
11029 | dev_priv->display.update_plane = ironlake_update_plane; | 11034 | dev_priv->display.update_primary_plane = |
11035 | ironlake_update_primary_plane; | ||
11030 | } else if (IS_VALLEYVIEW(dev)) { | 11036 | } else if (IS_VALLEYVIEW(dev)) { |
11031 | dev_priv->display.get_pipe_config = i9xx_get_pipe_config; | 11037 | dev_priv->display.get_pipe_config = i9xx_get_pipe_config; |
11032 | dev_priv->display.get_plane_config = i9xx_get_plane_config; | 11038 | dev_priv->display.get_plane_config = i9xx_get_plane_config; |
@@ -11034,7 +11040,8 @@ static void intel_init_display(struct drm_device *dev) | |||
11034 | dev_priv->display.crtc_enable = valleyview_crtc_enable; | 11040 | dev_priv->display.crtc_enable = valleyview_crtc_enable; |
11035 | dev_priv->display.crtc_disable = i9xx_crtc_disable; | 11041 | dev_priv->display.crtc_disable = i9xx_crtc_disable; |
11036 | dev_priv->display.off = i9xx_crtc_off; | 11042 | dev_priv->display.off = i9xx_crtc_off; |
11037 | dev_priv->display.update_plane = i9xx_update_plane; | 11043 | dev_priv->display.update_primary_plane = |
11044 | i9xx_update_primary_plane; | ||
11038 | } else { | 11045 | } else { |
11039 | dev_priv->display.get_pipe_config = i9xx_get_pipe_config; | 11046 | dev_priv->display.get_pipe_config = i9xx_get_pipe_config; |
11040 | dev_priv->display.get_plane_config = i9xx_get_plane_config; | 11047 | dev_priv->display.get_plane_config = i9xx_get_plane_config; |
@@ -11042,7 +11049,8 @@ static void intel_init_display(struct drm_device *dev) | |||
11042 | dev_priv->display.crtc_enable = i9xx_crtc_enable; | 11049 | dev_priv->display.crtc_enable = i9xx_crtc_enable; |
11043 | dev_priv->display.crtc_disable = i9xx_crtc_disable; | 11050 | dev_priv->display.crtc_disable = i9xx_crtc_disable; |
11044 | dev_priv->display.off = i9xx_crtc_off; | 11051 | dev_priv->display.off = i9xx_crtc_off; |
11045 | dev_priv->display.update_plane = i9xx_update_plane; | 11052 | dev_priv->display.update_primary_plane = |
11053 | i9xx_update_primary_plane; | ||
11046 | } | 11054 | } |
11047 | 11055 | ||
11048 | /* Returns the core display clock speed */ | 11056 | /* Returns the core display clock speed */ |