History

Merge tag 'drm-fixes-for-v4.16-rc7' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie: "A bunch of fixes all over the place (core, i915, amdgpu, imx, sun4i, ast, tegra, vmwgfx), nothing too serious or worrying at this stage. - one uapi fix to stop multi-planar images with getfb - Sun4i error path and clock fixes - udl driver mmap offset fix - i915 DP MST and GPU reset fixes - vmwgfx mutex and black screen fixes - imx array underflow fix and vblank fix - amdgpu: display fixes - exynos devicetree fix - ast mode fix" * tag 'drm-fixes-for-v4.16-rc7' of git://people.freedesktop.org/~airlied/linux: (29 commits) drm/ast: Fixed 1280x800 Display Issue drm: udl: Properly check framebuffer mmap offsets drm/i915: Specify which engines to reset following semaphore/event lockups drm/vmwgfx: Fix a destoy-while-held mutex problem. drm/vmwgfx: Fix black screen and device errors when running without fbdev drm: Reject getfb for multi-plane framebuffers drm/amd/display: Add one to EDID's audio channel count when passing to DC drm/amd/display: We shouldn't set format_default on plane as atomic driver drm/amd/display: Fix FMT truncation programming drm/amd/display: Allow truncation to 10 bits drm/sun4i: hdmi: Fix another error handling path in 'sun4i_hdmi_bind()' drm/sun4i: hdmi: Fix an error handling path in 'sun4i_hdmi_bind()' drm/i915/dp: Write to SET_POWER dpcd to enable MST hub. drm/amd/display: fix dereferencing possible ERR_PTR() drm/amd/display: Refine disable VGA drm/tegra: Shutdown on driver unbind drm/tegra: dsi: Don't disable regulator on ->exit() drm/tegra: dc: Detach IOMMU group from domain only once dt-bindings: exynos: Document #sound-dai-cells property of the HDMI node drm/imx: move arming of the vblank event to atomic_flush ...

Linus Torvalds committed 8 years ago

Commit 9ec7ccc2 parents e7d7743 5a9f69829 files · +176 −84Browse files

Unified · Split

29 files
  1. Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt +1 −0
  2. drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +6 −3
  3. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +3 −2
  4. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c +1 −1
  5. drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h +7 −1
  6. drivers/gpu/drm/amd/display/dc/dce/dce_opp.c +4 −5
  7. drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c +15 −5
  8. drivers/gpu/drm/ast/ast_tables.h +2 −2
  9. drivers/gpu/drm/drm_framebuffer.c +7 −0
  10. drivers/gpu/drm/i915/intel_ddi.c +2 −5
  11. drivers/gpu/drm/i915/intel_hangcheck.c +2 −2
  12. drivers/gpu/drm/imx/ipuv3-crtc.c +5 −0
  13. drivers/gpu/drm/imx/ipuv3-plane.c +6 −4
  14. drivers/gpu/drm/radeon/radeon_connectors.c +12 −19
  15. drivers/gpu/drm/sun4i/sun4i_drv.c +1 −2
  16. drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c +4 −2
  17. drivers/gpu/drm/sun4i/sun4i_tcon.c +3 −2
  18. drivers/gpu/drm/tegra/dc.c +13 −3
  19. drivers/gpu/drm/tegra/drm.c +1 −0
  20. drivers/gpu/drm/tegra/dsi.c +0 −1
  21. drivers/gpu/drm/tegra/plane.c +6 −3
  22. drivers/gpu/drm/udl/udl_fb.c +7 −2
  23. drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +13 −0
  24. drivers/gpu/drm/vmwgfx/vmwgfx_drv.h +1 −0
  25. drivers/gpu/drm/vmwgfx/vmwgfx_kms.c +30 −9
  26. drivers/gpu/drm/vmwgfx/vmwgfx_kms.h +9 −4
  27. drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c +3 −2
  28. drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c +3 −2
  29. drivers/gpu/ipu-v3/ipu-prg.c +9 −3
Documentation/devicetree/bindings/display/exynos/exynos_hdmi.txt+1−0
@@ -16,6 +16,7 @@ Required properties: · 15 unmodified lines
16- ddc: phandle to the hdmi ddc node16- ddc: phandle to the hdmi ddc node
17- phy: phandle to the hdmi phy node17- phy: phandle to the hdmi phy node
18- samsung,syscon-phandle: phandle for system controller node for PMU.18- samsung,syscon-phandle: phandle for system controller node for PMU.
19- #sound-dai-cells: should be 0.
19 20
20Required properties for Exynos 4210, 4212, 5420 and 5433:21Required properties for Exynos 4210, 4212, 5420 and 5433:
21- clocks: list of clock IDs from SoC clock driver.22- clocks: list of clock IDs from SoC clock driver.
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c+6−3
@@ -2063,9 +2063,12 @@ void amdgpu_device_fini(struct amdgpu_device *adev) · 2062 unmodified lines
2063 2063
2064 DRM_INFO("amdgpu: finishing device.\n");2064 DRM_INFO("amdgpu: finishing device.\n");
2065 adev->shutdown = true;2065 adev->shutdown = true;
2066 if (adev->mode_info.mode_config_initialized)2066 if (adev->mode_info.mode_config_initialized){
2067 drm_crtc_force_disable_all(adev->ddev);2067 if (!amdgpu_device_has_dc_support(adev))
2068 2068 drm_crtc_force_disable_all(adev->ddev);
2069 else
2070 drm_atomic_helper_shutdown(adev->ddev);
2071 }
2069 amdgpu_ib_pool_fini(adev);2072 amdgpu_ib_pool_fini(adev);
2070 amdgpu_fence_driver_fini(adev);2073 amdgpu_fence_driver_fini(adev);
2071 amdgpu_fbdev_fini(adev);2074 amdgpu_fbdev_fini(adev);
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c+3−2
@@ -3134,8 +3134,6 @@ static int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm, · 3133 unmodified lines
3134 3134
3135 switch (aplane->base.type) {3135 switch (aplane->base.type) {
3136 case DRM_PLANE_TYPE_PRIMARY:3136 case DRM_PLANE_TYPE_PRIMARY:
3137 aplane->base.format_default = true;
3138
3139 res = drm_universal_plane_init(3137 res = drm_universal_plane_init(
3140 dm->adev->ddev,3138 dm->adev->ddev,
3141 &aplane->base,3139 &aplane->base,
@@ -4794,6 +4792,9 @@ static int dm_atomic_check_plane_state_fb(struct drm_atomic_state *state, · 1652 unmodified lines
4794 return -EDEADLK;4792 return -EDEADLK;
4795 4793
4796 crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);4794 crtc_state = drm_atomic_get_crtc_state(plane_state->state, crtc);
4795 if (IS_ERR(crtc_state))
4796 return PTR_ERR(crtc_state);
4797
4797 if (crtc->primary == plane && crtc_state->active) {4798 if (crtc->primary == plane && crtc_state->active) {
4798 if (!plane_state->fb)4799 if (!plane_state->fb)
4799 return -EINVAL;4800 return -EINVAL;
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c+1−1
@@ -109,7 +109,7 @@ enum dc_edid_status dm_helpers_parse_edid_caps( · 108 unmodified lines
109 struct cea_sad *sad = &sads[i];109 struct cea_sad *sad = &sads[i];
110 110
111 edid_caps->audio_modes[i].format_code = sad->format;111 edid_caps->audio_modes[i].format_code = sad->format;
112 edid_caps->audio_modes[i].channel_count = sad->channels;112 edid_caps->audio_modes[i].channel_count = sad->channels + 1;
113 edid_caps->audio_modes[i].sample_rate = sad->freq;113 edid_caps->audio_modes[i].sample_rate = sad->freq;
114 edid_caps->audio_modes[i].sample_size = sad->byte2;114 edid_caps->audio_modes[i].sample_size = sad->byte2;
115 }115 }
drivers/gpu/drm/amd/display/dc/dce/dce_hwseq.h+7−1
@@ -496,6 +496,9 @@ struct dce_hwseq_registers { · 495 unmodified lines
496 HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \496 HWS_SF(, DOMAIN7_PG_STATUS, DOMAIN7_PGFSM_PWR_STATUS, mask_sh), \
497 HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \497 HWS_SF(, DC_IP_REQUEST_CNTL, IP_REQUEST_EN, mask_sh), \
498 HWS_SF(, D1VGA_CONTROL, D1VGA_MODE_ENABLE, mask_sh),\498 HWS_SF(, D1VGA_CONTROL, D1VGA_MODE_ENABLE, mask_sh),\
499 HWS_SF(, D2VGA_CONTROL, D2VGA_MODE_ENABLE, mask_sh),\
500 HWS_SF(, D3VGA_CONTROL, D3VGA_MODE_ENABLE, mask_sh),\
501 HWS_SF(, D4VGA_CONTROL, D4VGA_MODE_ENABLE, mask_sh),\
499 HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\502 HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_ENABLE, mask_sh),\
500 HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh),\503 HWS_SF(, VGA_TEST_CONTROL, VGA_TEST_RENDER_START, mask_sh),\
501 HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \504 HWS_SF(, LVTMA_PWRSEQ_CNTL, LVTMA_BLON, mask_sh), \
@@ -591,7 +594,10 @@ struct dce_hwseq_registers { · 89 unmodified lines
591 type DENTIST_DISPCLK_WDIVIDER; \594 type DENTIST_DISPCLK_WDIVIDER; \
592 type VGA_TEST_ENABLE; \595 type VGA_TEST_ENABLE; \
593 type VGA_TEST_RENDER_START; \596 type VGA_TEST_RENDER_START; \
594 type D1VGA_MODE_ENABLE;597 type D1VGA_MODE_ENABLE; \
598 type D2VGA_MODE_ENABLE; \
599 type D3VGA_MODE_ENABLE; \
600 type D4VGA_MODE_ENABLE;
595 601
596struct dce_hwseq_shift {602struct dce_hwseq_shift {
597 HWSEQ_REG_FIELD_LIST(uint8_t)603 HWSEQ_REG_FIELD_LIST(uint8_t)
drivers/gpu/drm/amd/display/dc/dce/dce_opp.c+4−5
@@ -128,23 +128,22 @@ static void set_truncation( · 127 unmodified lines
128 return;128 return;
129 }129 }
130 /* on other format-to do */130 /* on other format-to do */
131 if (params->flags.TRUNCATE_ENABLED == 0 ||131 if (params->flags.TRUNCATE_ENABLED == 0)
132 params->flags.TRUNCATE_DEPTH == 2)
133 return;132 return;
134 /*Set truncation depth and Enable truncation*/133 /*Set truncation depth and Enable truncation*/
135 REG_UPDATE_3(FMT_BIT_DEPTH_CONTROL,134 REG_UPDATE_3(FMT_BIT_DEPTH_CONTROL,
136 FMT_TRUNCATE_EN, 1,135 FMT_TRUNCATE_EN, 1,
137 FMT_TRUNCATE_DEPTH,136 FMT_TRUNCATE_DEPTH,
138 params->flags.TRUNCATE_MODE,137 params->flags.TRUNCATE_DEPTH,
139 FMT_TRUNCATE_MODE,138 FMT_TRUNCATE_MODE,
140 params->flags.TRUNCATE_DEPTH);139 params->flags.TRUNCATE_MODE);
141}140}
142 141
143 142
144/**143/**
145 * set_spatial_dither144 * set_spatial_dither
146 * 1) set spatial dithering mode: pattern of seed145 * 1) set spatial dithering mode: pattern of seed
147 * 2) set spatical dithering depth: 0 for 18bpp or 1 for 24bpp146 * 2) set spatial dithering depth: 0 for 18bpp or 1 for 24bpp
148 * 3) set random seed147 * 3) set random seed
149 * 4) set random mode148 * 4) set random mode
150 * lfsr is reset every frame or not reset149 * lfsr is reset every frame or not reset
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c+15−5
@@ -238,14 +238,24 @@ static void enable_power_gating_plane( · 237 unmodified lines
238static void disable_vga(238static void disable_vga(
239 struct dce_hwseq *hws)239 struct dce_hwseq *hws)
240{240{
241 unsigned int in_vga_mode = 0;241 unsigned int in_vga1_mode = 0;
242 242 unsigned int in_vga2_mode = 0;
243 REG_GET(D1VGA_CONTROL, D1VGA_MODE_ENABLE, &in_vga_mode);243 unsigned int in_vga3_mode = 0;
244 244 unsigned int in_vga4_mode = 0;
245 if (in_vga_mode == 0)245
246 REG_GET(D1VGA_CONTROL, D1VGA_MODE_ENABLE, &in_vga1_mode);
247 REG_GET(D2VGA_CONTROL, D2VGA_MODE_ENABLE, &in_vga2_mode);
248 REG_GET(D3VGA_CONTROL, D3VGA_MODE_ENABLE, &in_vga3_mode);
249 REG_GET(D4VGA_CONTROL, D4VGA_MODE_ENABLE, &in_vga4_mode);
250
251 if (in_vga1_mode == 0 && in_vga2_mode == 0 &&
252 in_vga3_mode == 0 && in_vga4_mode == 0)
246 return;253 return;
247 254
248 REG_WRITE(D1VGA_CONTROL, 0);255 REG_WRITE(D1VGA_CONTROL, 0);
256 REG_WRITE(D2VGA_CONTROL, 0);
257 REG_WRITE(D3VGA_CONTROL, 0);
258 REG_WRITE(D4VGA_CONTROL, 0);
249 259
250 /* HW Engineer's Notes:260 /* HW Engineer's Notes:
251 * During switch from vga->extended, if we set the VGA_TEST_ENABLE and261 * During switch from vga->extended, if we set the VGA_TEST_ENABLE and
drivers/gpu/drm/ast/ast_tables.h+2−2
@@ -97,7 +97,7 @@ static const struct ast_vbios_dclk_info dclk_table[] = { · 96 unmodified lines
97 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */97 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */
98 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */98 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */
99 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */99 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */
100 {0xa7, 0x78, 0x80}, /* 11: VCLK83.5 */100 {0x68, 0x6f, 0x80}, /* 11: VCLK83.5 */
101 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */101 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */
102 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */102 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */
103 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */103 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */
@@ -127,7 +127,7 @@ static const struct ast_vbios_dclk_info dclk_table_ast2500[] = { · 23 unmodified lines
127 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */127 {0x67, 0x22, 0x00}, /* 0E: VCLK157_5 */
128 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */128 {0x6A, 0x22, 0x00}, /* 0F: VCLK162 */
129 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */129 {0x4d, 0x4c, 0x80}, /* 10: VCLK154 */
130 {0xa7, 0x78, 0x80}, /* 11: VCLK83.5 */130 {0x68, 0x6f, 0x80}, /* 11: VCLK83.5 */
131 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */131 {0x28, 0x49, 0x80}, /* 12: VCLK106.5 */
132 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */132 {0x37, 0x49, 0x80}, /* 13: VCLK146.25 */
133 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */133 {0x1f, 0x45, 0x80}, /* 14: VCLK148.5 */
drivers/gpu/drm/drm_framebuffer.c+7−0
@@ -461,6 +461,12 @@ int drm_mode_getfb(struct drm_device *dev, · 460 unmodified lines
461 if (!fb)461 if (!fb)
462 return -ENOENT;462 return -ENOENT;
463 463
464 /* Multi-planar framebuffers need getfb2. */
465 if (fb->format->num_planes > 1) {
466 ret = -EINVAL;
467 goto out;
468 }
469
464 r->height = fb->height;470 r->height = fb->height;
465 r->width = fb->width;471 r->width = fb->width;
466 r->depth = fb->format->depth;472 r->depth = fb->format->depth;
@@ -484,6 +490,7 @@ int drm_mode_getfb(struct drm_device *dev, · 17 unmodified lines
484 ret = -ENODEV;490 ret = -ENODEV;
485 }491 }
486 492
493out:
487 drm_framebuffer_put(fb);494 drm_framebuffer_put(fb);
488 495
489 return ret;496 return ret;
drivers/gpu/drm/i915/intel_ddi.c+2−5
@@ -2175,8 +2175,7 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, · 2174 unmodified lines
2175 intel_prepare_dp_ddi_buffers(encoder, crtc_state);2175 intel_prepare_dp_ddi_buffers(encoder, crtc_state);
2176 2176
2177 intel_ddi_init_dp_buf_reg(encoder);2177 intel_ddi_init_dp_buf_reg(encoder);
2178 if (!is_mst)2178 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
2179 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
2180 intel_dp_start_link_train(intel_dp);2179 intel_dp_start_link_train(intel_dp);
2181 if (port != PORT_A || INTEL_GEN(dev_priv) >= 9)2180 if (port != PORT_A || INTEL_GEN(dev_priv) >= 9)
2182 intel_dp_stop_link_train(intel_dp);2181 intel_dp_stop_link_train(intel_dp);
@@ -2274,14 +2273,12 @@ static void intel_ddi_post_disable_dp(struct intel_encoder *encoder, · 91 unmodified lines
2274 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);2273 struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
2275 struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);2274 struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);
2276 struct intel_dp *intel_dp = &dig_port->dp;2275 struct intel_dp *intel_dp = &dig_port->dp;
2277 bool is_mst = intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST);
2278 2276
2279 /*2277 /*
2280 * Power down sink before disabling the port, otherwise we end2278 * Power down sink before disabling the port, otherwise we end
2281 * up getting interrupts from the sink on detecting link loss.2279 * up getting interrupts from the sink on detecting link loss.
2282 */2280 */
2283 if (!is_mst)2281 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
2284 intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_OFF);
2285 2282
2286 intel_disable_ddi_buf(encoder);2283 intel_disable_ddi_buf(encoder);
2287 2284
drivers/gpu/drm/i915/intel_hangcheck.c+2−2
@@ -246,7 +246,7 @@ engine_stuck(struct intel_engine_cs *engine, u64 acthd) · 245 unmodified lines
246 */246 */
247 tmp = I915_READ_CTL(engine);247 tmp = I915_READ_CTL(engine);
248 if (tmp & RING_WAIT) {248 if (tmp & RING_WAIT) {
249 i915_handle_error(dev_priv, 0,249 i915_handle_error(dev_priv, BIT(engine->id),
250 "Kicking stuck wait on %s",250 "Kicking stuck wait on %s",
251 engine->name);251 engine->name);
252 I915_WRITE_CTL(engine, tmp);252 I915_WRITE_CTL(engine, tmp);
@@ -258,7 +258,7 @@ engine_stuck(struct intel_engine_cs *engine, u64 acthd) · 5 unmodified lines
258 default:258 default:
259 return ENGINE_DEAD;259 return ENGINE_DEAD;
260 case 1:260 case 1:
261 i915_handle_error(dev_priv, 0,261 i915_handle_error(dev_priv, ALL_ENGINES,
262 "Kicking stuck semaphore on %s",262 "Kicking stuck semaphore on %s",
263 engine->name);263 engine->name);
264 I915_WRITE_CTL(engine, tmp);264 I915_WRITE_CTL(engine, tmp);
drivers/gpu/drm/imx/ipuv3-crtc.c+5−0
@@ -225,7 +225,11 @@ static void ipu_crtc_atomic_begin(struct drm_crtc *crtc, · 224 unmodified lines
225 struct drm_crtc_state *old_crtc_state)225 struct drm_crtc_state *old_crtc_state)
226{226{
227 drm_crtc_vblank_on(crtc);227 drm_crtc_vblank_on(crtc);
228}
228 229
230static void ipu_crtc_atomic_flush(struct drm_crtc *crtc,
231 struct drm_crtc_state *old_crtc_state)
232{
229 spin_lock_irq(&crtc->dev->event_lock);233 spin_lock_irq(&crtc->dev->event_lock);
230 if (crtc->state->event) {234 if (crtc->state->event) {
231 WARN_ON(drm_crtc_vblank_get(crtc));235 WARN_ON(drm_crtc_vblank_get(crtc));
@@ -293,6 +297,7 @@ static const struct drm_crtc_helper_funcs ipu_helper_funcs = { · 61 unmodified lines
293 .mode_set_nofb = ipu_crtc_mode_set_nofb,297 .mode_set_nofb = ipu_crtc_mode_set_nofb,
294 .atomic_check = ipu_crtc_atomic_check,298 .atomic_check = ipu_crtc_atomic_check,
295 .atomic_begin = ipu_crtc_atomic_begin,299 .atomic_begin = ipu_crtc_atomic_begin,
300 .atomic_flush = ipu_crtc_atomic_flush,
296 .atomic_disable = ipu_crtc_atomic_disable,301 .atomic_disable = ipu_crtc_atomic_disable,
297 .atomic_enable = ipu_crtc_atomic_enable,302 .atomic_enable = ipu_crtc_atomic_enable,
298};303};
drivers/gpu/drm/imx/ipuv3-plane.c+6−4
@@ -22,6 +22,7 @@ · 21 unmodified lines
22#include <drm/drm_plane_helper.h>22#include <drm/drm_plane_helper.h>
23 23
24#include "video/imx-ipu-v3.h"24#include "video/imx-ipu-v3.h"
25#include "imx-drm.h"
25#include "ipuv3-plane.h"26#include "ipuv3-plane.h"
26 27
27struct ipu_plane_state {28struct ipu_plane_state {
@@ -272,7 +273,7 @@ static void ipu_plane_destroy(struct drm_plane *plane) · 244 unmodified lines
272 kfree(ipu_plane);273 kfree(ipu_plane);
273}274}
274 275
275void ipu_plane_state_reset(struct drm_plane *plane)276static void ipu_plane_state_reset(struct drm_plane *plane)
276{277{
277 struct ipu_plane_state *ipu_state;278 struct ipu_plane_state *ipu_state;
278 279
@@ -292,7 +293,8 @@ void ipu_plane_state_reset(struct drm_plane *plane) · 13 unmodified lines
292 plane->state = &ipu_state->base;293 plane->state = &ipu_state->base;
293}294}
294 295
295struct drm_plane_state *ipu_plane_duplicate_state(struct drm_plane *plane)296static struct drm_plane_state *
297ipu_plane_duplicate_state(struct drm_plane *plane)
296{298{
297 struct ipu_plane_state *state;299 struct ipu_plane_state *state;
298 300
@@ -306,8 +308,8 @@ struct drm_plane_state *ipu_plane_duplicate_state(struct drm_plane *plane) · 7 unmodified lines
306 return &state->base;308 return &state->base;
307}309}
308 310
309void ipu_plane_destroy_state(struct drm_plane *plane,311static void ipu_plane_destroy_state(struct drm_plane *plane,
310 struct drm_plane_state *state)312 struct drm_plane_state *state)
311{313{
312 struct ipu_plane_state *ipu_state = to_ipu_plane_state(state);314 struct ipu_plane_state *ipu_state = to_ipu_plane_state(state);
313 315
drivers/gpu/drm/radeon/radeon_connectors.c+12−19
@@ -90,25 +90,18 @@ void radeon_connector_hotplug(struct drm_connector *connector) · 89 unmodified lines
90 /* don't do anything if sink is not display port, i.e.,90 /* don't do anything if sink is not display port, i.e.,
91 * passive dp->(dvi|hdmi) adaptor91 * passive dp->(dvi|hdmi) adaptor
92 */92 */
93 if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {93 if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT &&
94 int saved_dpms = connector->dpms;94 radeon_hpd_sense(rdev, radeon_connector->hpd.hpd) &&
95 /* Only turn off the display if it's physically disconnected */95 radeon_dp_needs_link_train(radeon_connector)) {
96 if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {96 /* Don't start link training before we have the DPCD */
97 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);97 if (!radeon_dp_getdpcd(radeon_connector))
98 } else if (radeon_dp_needs_link_train(radeon_connector)) {98 return;
99 /* Don't try to start link training before we99
100 * have the dpcd */100 /* Turn the connector off and back on immediately, which
101 if (!radeon_dp_getdpcd(radeon_connector))101 * will trigger link training
102 return;102 */
103 103 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
104 /* set it to OFF so that drm_helper_connector_dpms()104 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
105 * won't return immediately since the current state
106 * is ON at this point.
107 */
108 connector->dpms = DRM_MODE_DPMS_OFF;
109 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
110 }
111 connector->dpms = saved_dpms;
112 }105 }
113 }106 }
114}107}
drivers/gpu/drm/sun4i/sun4i_drv.c+1−2
@@ -111,7 +111,7 @@ static int sun4i_drv_bind(struct device *dev) · 110 unmodified lines
111 /* drm_vblank_init calls kcalloc, which can fail */111 /* drm_vblank_init calls kcalloc, which can fail */
112 ret = drm_vblank_init(drm, drm->mode_config.num_crtc);112 ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
113 if (ret)113 if (ret)
114 goto free_mem_region;114 goto cleanup_mode_config;
115 115
116 drm->irq_enabled = true;116 drm->irq_enabled = true;
117 117
@@ -139,7 +139,6 @@ finish_poll: · 21 unmodified lines
139 sun4i_framebuffer_free(drm);139 sun4i_framebuffer_free(drm);
140cleanup_mode_config:140cleanup_mode_config:
141 drm_mode_config_cleanup(drm);141 drm_mode_config_cleanup(drm);
142free_mem_region:
143 of_reserved_mem_device_release(dev);142 of_reserved_mem_device_release(dev);
144free_drm:143free_drm:
145 drm_dev_unref(drm);144 drm_dev_unref(drm);
drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c+4−2
@@ -538,7 +538,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master, · 537 unmodified lines
538 &sun4i_hdmi_regmap_config);538 &sun4i_hdmi_regmap_config);
539 if (IS_ERR(hdmi->regmap)) {539 if (IS_ERR(hdmi->regmap)) {
540 dev_err(dev, "Couldn't create HDMI encoder regmap\n");540 dev_err(dev, "Couldn't create HDMI encoder regmap\n");
541 return PTR_ERR(hdmi->regmap);541 ret = PTR_ERR(hdmi->regmap);
542 goto err_disable_mod_clk;
542 }543 }
543 544
544 ret = sun4i_tmds_create(hdmi);545 ret = sun4i_tmds_create(hdmi);
@@ -551,7 +552,8 @@ static int sun4i_hdmi_bind(struct device *dev, struct device *master, · 6 unmodified lines
551 hdmi->ddc_parent_clk = devm_clk_get(dev, "ddc");552 hdmi->ddc_parent_clk = devm_clk_get(dev, "ddc");
552 if (IS_ERR(hdmi->ddc_parent_clk)) {553 if (IS_ERR(hdmi->ddc_parent_clk)) {
553 dev_err(dev, "Couldn't get the HDMI DDC clock\n");554 dev_err(dev, "Couldn't get the HDMI DDC clock\n");
554 return PTR_ERR(hdmi->ddc_parent_clk);555 ret = PTR_ERR(hdmi->ddc_parent_clk);
556 goto err_disable_mod_clk;
555 }557 }
556 } else {558 } else {
557 hdmi->ddc_parent_clk = hdmi->tmds_clk;559 hdmi->ddc_parent_clk = hdmi->tmds_clk;
drivers/gpu/drm/sun4i/sun4i_tcon.c+3−2
@@ -103,6 +103,7 @@ static void sun4i_tcon_channel_set_status(struct sun4i_tcon *tcon, int channel, · 102 unmodified lines
103 103
104 if (enabled) {104 if (enabled) {
105 clk_prepare_enable(clk);105 clk_prepare_enable(clk);
106 clk_rate_exclusive_get(clk);
106 } else {107 } else {
107 clk_rate_exclusive_put(clk);108 clk_rate_exclusive_put(clk);
108 clk_disable_unprepare(clk);109 clk_disable_unprepare(clk);
@@ -262,7 +263,7 @@ static void sun4i_tcon0_mode_set_common(struct sun4i_tcon *tcon, · 153 unmodified lines
262 const struct drm_display_mode *mode)263 const struct drm_display_mode *mode)
263{264{
264 /* Configure the dot clock */265 /* Configure the dot clock */
265 clk_set_rate_exclusive(tcon->dclk, mode->crtc_clock * 1000);266 clk_set_rate(tcon->dclk, mode->crtc_clock * 1000);
266 267
267 /* Set the resolution */268 /* Set the resolution */
268 regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG,269 regmap_write(tcon->regs, SUN4I_TCON0_BASIC0_REG,
@@ -423,7 +424,7 @@ static void sun4i_tcon1_mode_set(struct sun4i_tcon *tcon, · 154 unmodified lines
423 WARN_ON(!tcon->quirks->has_channel_1);424 WARN_ON(!tcon->quirks->has_channel_1);
424 425
425 /* Configure the dot clock */426 /* Configure the dot clock */
426 clk_set_rate_exclusive(tcon->sclk1, mode->crtc_clock * 1000);427 clk_set_rate(tcon->sclk1, mode->crtc_clock * 1000);
427 428
428 /* Adjust clock delay */429 /* Adjust clock delay */
429 clk_delay = sun4i_tcon_get_clk_delay(mode, 1);430 clk_delay = sun4i_tcon_get_clk_delay(mode, 1);
drivers/gpu/drm/tegra/dc.c+13−3
@@ -1903,8 +1903,12 @@ cleanup: · 1902 unmodified lines
1903 if (!IS_ERR(primary))1903 if (!IS_ERR(primary))
1904 drm_plane_cleanup(primary);1904 drm_plane_cleanup(primary);
1905 1905
1906 if (group && tegra->domain) {1906 if (group && dc->domain) {
1907 iommu_detach_group(tegra->domain, group);1907 if (group == tegra->group) {
1908 iommu_detach_group(dc->domain, group);
1909 tegra->group = NULL;
1910 }
1911
1908 dc->domain = NULL;1912 dc->domain = NULL;
1909 }1913 }
1910 1914
@@ -1913,8 +1917,10 @@ cleanup: · 2 unmodified lines
1913 1917
1914static int tegra_dc_exit(struct host1x_client *client)1918static int tegra_dc_exit(struct host1x_client *client)
1915{1919{
1920 struct drm_device *drm = dev_get_drvdata(client->parent);
1916 struct iommu_group *group = iommu_group_get(client->dev);1921 struct iommu_group *group = iommu_group_get(client->dev);
1917 struct tegra_dc *dc = host1x_client_to_dc(client);1922 struct tegra_dc *dc = host1x_client_to_dc(client);
1923 struct tegra_drm *tegra = drm->dev_private;
1918 int err;1924 int err;
1919 1925
1920 devm_free_irq(dc->dev, dc->irq, dc);1926 devm_free_irq(dc->dev, dc->irq, dc);
@@ -1926,7 +1932,11 @@ static int tegra_dc_exit(struct host1x_client *client) · 5 unmodified lines
1926 }1932 }
1927 1933
1928 if (group && dc->domain) {1934 if (group && dc->domain) {
1929 iommu_detach_group(dc->domain, group);1935 if (group == tegra->group) {
1936 iommu_detach_group(dc->domain, group);
1937 tegra->group = NULL;
1938 }
1939
1930 dc->domain = NULL;1940 dc->domain = NULL;
1931 }1941 }
1932 1942
drivers/gpu/drm/tegra/drm.c+1−0
@@ -250,6 +250,7 @@ static void tegra_drm_unload(struct drm_device *drm) · 249 unmodified lines
250 250
251 drm_kms_helper_poll_fini(drm);251 drm_kms_helper_poll_fini(drm);
252 tegra_drm_fb_exit(drm);252 tegra_drm_fb_exit(drm);
253 drm_atomic_helper_shutdown(drm);
253 drm_mode_config_cleanup(drm);254 drm_mode_config_cleanup(drm);
254 255
255 err = host1x_device_exit(device);256 err = host1x_device_exit(device);
drivers/gpu/drm/tegra/dsi.c+0−1
@@ -1072,7 +1072,6 @@ static int tegra_dsi_exit(struct host1x_client *client) · 1071 unmodified lines
1072 struct tegra_dsi *dsi = host1x_client_to_dsi(client);1072 struct tegra_dsi *dsi = host1x_client_to_dsi(client);
1073 1073
1074 tegra_output_exit(&dsi->output);1074 tegra_output_exit(&dsi->output);
1075 regulator_disable(dsi->vdd);
1076 1075
1077 return 0;1076 return 0;
1078}1077}
drivers/gpu/drm/tegra/plane.c+6−3
@@ -297,6 +297,10 @@ int tegra_plane_format_get_alpha(unsigned int opaque, unsigned int *alpha) · 296 unmodified lines
297 case WIN_COLOR_DEPTH_B8G8R8X8:297 case WIN_COLOR_DEPTH_B8G8R8X8:
298 *alpha = WIN_COLOR_DEPTH_B8G8R8A8;298 *alpha = WIN_COLOR_DEPTH_B8G8R8A8;
299 return 0;299 return 0;
300
301 case WIN_COLOR_DEPTH_B5G6R5:
302 *alpha = opaque;
303 return 0;
300 }304 }
301 305
302 return -EINVAL;306 return -EINVAL;
@@ -330,9 +334,6 @@ void tegra_plane_check_dependent(struct tegra_plane *tegra, · 27 unmodified lines
330 unsigned int zpos[2];334 unsigned int zpos[2];
331 unsigned int i;335 unsigned int i;
332 336
333 for (i = 0; i < 3; i++)
334 state->dependent[i] = false;
335
336 for (i = 0; i < 2; i++)337 for (i = 0; i < 2; i++)
337 zpos[i] = 0;338 zpos[i] = 0;
338 339
@@ -346,6 +347,8 @@ void tegra_plane_check_dependent(struct tegra_plane *tegra, · 7 unmodified lines
346 347
347 index = tegra_plane_get_overlap_index(tegra, p);348 index = tegra_plane_get_overlap_index(tegra, p);
348 349
350 state->dependent[index] = false;
351
349 /*352 /*
350 * If any of the other planes is on top of this plane and uses353 * If any of the other planes is on top of this plane and uses
351 * a format with an alpha component, mark this plane as being354 * a format with an alpha component, mark this plane as being
drivers/gpu/drm/udl/udl_fb.c+7−2
@@ -159,10 +159,15 @@ static int udl_fb_mmap(struct fb_info *info, struct vm_area_struct *vma) · 158 unmodified lines
159{159{
160 unsigned long start = vma->vm_start;160 unsigned long start = vma->vm_start;
161 unsigned long size = vma->vm_end - vma->vm_start;161 unsigned long size = vma->vm_end - vma->vm_start;
162 unsigned long offset = vma->vm_pgoff << PAGE_SHIFT;162 unsigned long offset;
163 unsigned long page, pos;163 unsigned long page, pos;
164 164
165 if (offset + size > info->fix.smem_len)165 if (vma->vm_pgoff > (~0UL >> PAGE_SHIFT))
166 return -EINVAL;
167
168 offset = vma->vm_pgoff << PAGE_SHIFT;
169
170 if (offset > info->fix.smem_len || size > info->fix.smem_len - offset)
166 return -EINVAL;171 return -EINVAL;
167 172
168 pos = (unsigned long)info->fix.smem_start + offset;173 pos = (unsigned long)info->fix.smem_start + offset;
drivers/gpu/drm/vmwgfx/vmwgfx_drv.c+13−0
@@ -1337,6 +1337,19 @@ static void __vmw_svga_disable(struct vmw_private *dev_priv) · 1336 unmodified lines
1337 */1337 */
1338void vmw_svga_disable(struct vmw_private *dev_priv)1338void vmw_svga_disable(struct vmw_private *dev_priv)
1339{1339{
1340 /*
1341 * Disabling SVGA will turn off device modesetting capabilities, so
1342 * notify KMS about that so that it doesn't cache atomic state that
1343 * isn't valid anymore, for example crtcs turned on.
1344 * Strictly we'd want to do this under the SVGA lock (or an SVGA mutex),
1345 * but vmw_kms_lost_device() takes the reservation sem and thus we'll
1346 * end up with lock order reversal. Thus, a master may actually perform
1347 * a new modeset just after we call vmw_kms_lost_device() and race with
1348 * vmw_svga_disable(), but that should at worst cause atomic KMS state
1349 * to be inconsistent with the device, causing modesetting problems.
1350 *
1351 */
1352 vmw_kms_lost_device(dev_priv->dev);
1340 ttm_write_lock(&dev_priv->reservation_sem, false);1353 ttm_write_lock(&dev_priv->reservation_sem, false);
1341 spin_lock(&dev_priv->svga_lock);1354 spin_lock(&dev_priv->svga_lock);
1342 if (dev_priv->bdev.man[TTM_PL_VRAM].use_type) {1355 if (dev_priv->bdev.man[TTM_PL_VRAM].use_type) {
drivers/gpu/drm/vmwgfx/vmwgfx_drv.h+1−0
@@ -938,6 +938,7 @@ int vmw_kms_present(struct vmw_private *dev_priv, · 937 unmodified lines
938int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,938int vmw_kms_update_layout_ioctl(struct drm_device *dev, void *data,
939 struct drm_file *file_priv);939 struct drm_file *file_priv);
940void vmw_kms_legacy_hotspot_clear(struct vmw_private *dev_priv);940void vmw_kms_legacy_hotspot_clear(struct vmw_private *dev_priv);
941void vmw_kms_lost_device(struct drm_device *dev);
941 942
942int vmw_dumb_create(struct drm_file *file_priv,943int vmw_dumb_create(struct drm_file *file_priv,
943 struct drm_device *dev,944 struct drm_device *dev,
drivers/gpu/drm/vmwgfx/vmwgfx_kms.c+30−9
@@ -31,7 +31,6 @@ · 30 unmodified lines
31#include <drm/drm_atomic_helper.h>31#include <drm/drm_atomic_helper.h>
32#include <drm/drm_rect.h>32#include <drm/drm_rect.h>
33 33
34
35/* Might need a hrtimer here? */34/* Might need a hrtimer here? */
36#define VMWGFX_PRESENT_RATE ((HZ / 60 > 0) ? HZ / 60 : 1)35#define VMWGFX_PRESENT_RATE ((HZ / 60 > 0) ? HZ / 60 : 1)
37 36
@@ -2517,9 +2516,12 @@ void vmw_kms_helper_buffer_finish(struct vmw_private *dev_priv, · 2479 unmodified lines
2517 * Helper to be used if an error forces the caller to undo the actions of2516 * Helper to be used if an error forces the caller to undo the actions of
2518 * vmw_kms_helper_resource_prepare.2517 * vmw_kms_helper_resource_prepare.
2519 */2518 */
2520void vmw_kms_helper_resource_revert(struct vmw_resource *res)2519void vmw_kms_helper_resource_revert(struct vmw_validation_ctx *ctx)
2521{2520{
2522 vmw_kms_helper_buffer_revert(res->backup);2521 struct vmw_resource *res = ctx->res;
2522
2523 vmw_kms_helper_buffer_revert(ctx->buf);
2524 vmw_dmabuf_unreference(&ctx->buf);
2523 vmw_resource_unreserve(res, false, NULL, 0);2525 vmw_resource_unreserve(res, false, NULL, 0);
2524 mutex_unlock(&res->dev_priv->cmdbuf_mutex);2526 mutex_unlock(&res->dev_priv->cmdbuf_mutex);
2525}2527}
@@ -2536,10 +2538,14 @@ void vmw_kms_helper_resource_revert(struct vmw_resource *res) · 10 unmodified lines
2536 * interrupted by a signal.2538 * interrupted by a signal.
2537 */2539 */
2538int vmw_kms_helper_resource_prepare(struct vmw_resource *res,2540int vmw_kms_helper_resource_prepare(struct vmw_resource *res,
2539 bool interruptible)2541 bool interruptible,
2542 struct vmw_validation_ctx *ctx)
2540{2543{
2541 int ret = 0;2544 int ret = 0;
2542 2545
2546 ctx->buf = NULL;
2547 ctx->res = res;
2548
2543 if (interruptible)2549 if (interruptible)
2544 ret = mutex_lock_interruptible(&res->dev_priv->cmdbuf_mutex);2550 ret = mutex_lock_interruptible(&res->dev_priv->cmdbuf_mutex);
2545 else2551 else
@@ -2558,6 +2564,8 @@ int vmw_kms_helper_resource_prepare(struct vmw_resource *res, · 12 unmodified lines
2558 res->dev_priv->has_mob);2564 res->dev_priv->has_mob);
2559 if (ret)2565 if (ret)
2560 goto out_unreserve;2566 goto out_unreserve;
2567
2568 ctx->buf = vmw_dmabuf_reference(res->backup);
2561 }2569 }
2562 ret = vmw_resource_validate(res);2570 ret = vmw_resource_validate(res);
2563 if (ret)2571 if (ret)
@@ -2565,7 +2573,7 @@ int vmw_kms_helper_resource_prepare(struct vmw_resource *res, · 1 unmodified line
2565 return 0;2573 return 0;
2566 2574
2567out_revert:2575out_revert:
2568 vmw_kms_helper_buffer_revert(res->backup);2576 vmw_kms_helper_buffer_revert(ctx->buf);
2569out_unreserve:2577out_unreserve:
2570 vmw_resource_unreserve(res, false, NULL, 0);2578 vmw_resource_unreserve(res, false, NULL, 0);
2571out_unlock:2579out_unlock:
@@ -2581,11 +2589,13 @@ out_unlock: · 9 unmodified lines
2581 * @out_fence: Optional pointer to a fence pointer. If non-NULL, a2589 * @out_fence: Optional pointer to a fence pointer. If non-NULL, a
2582 * ref-counted fence pointer is returned here.2590 * ref-counted fence pointer is returned here.
2583 */2591 */
2584void vmw_kms_helper_resource_finish(struct vmw_resource *res,2592void vmw_kms_helper_resource_finish(struct vmw_validation_ctx *ctx,
2585 struct vmw_fence_obj **out_fence)2593 struct vmw_fence_obj **out_fence)
2586{2594{
2587 if (res->backup || out_fence)2595 struct vmw_resource *res = ctx->res;
2588 vmw_kms_helper_buffer_finish(res->dev_priv, NULL, res->backup,2596
2597 if (ctx->buf || out_fence)
2598 vmw_kms_helper_buffer_finish(res->dev_priv, NULL, ctx->buf,
2589 out_fence, NULL);2599 out_fence, NULL);
2590 2600
2591 vmw_resource_unreserve(res, false, NULL, 0);2601 vmw_resource_unreserve(res, false, NULL, 0);
@@ -2851,3 +2861,14 @@ int vmw_kms_set_config(struct drm_mode_set *set, · 259 unmodified lines
2851 2861
2852 return drm_atomic_helper_set_config(set, ctx);2862 return drm_atomic_helper_set_config(set, ctx);
2853}2863}
2864
2865
2866/**
2867 * vmw_kms_lost_device - Notify kms that modesetting capabilities will be lost
2868 *
2869 * @dev: Pointer to the drm device
2870 */
2871void vmw_kms_lost_device(struct drm_device *dev)
2872{
2873 drm_atomic_helper_shutdown(dev);
2874}
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h+9−4
@@ -240,6 +240,11 @@ struct vmw_display_unit { · 239 unmodified lines
240 int set_gui_y;240 int set_gui_y;
241};241};
242 242
243struct vmw_validation_ctx {
244 struct vmw_resource *res;
245 struct vmw_dma_buffer *buf;
246};
247
243#define vmw_crtc_to_du(x) \248#define vmw_crtc_to_du(x) \
244 container_of(x, struct vmw_display_unit, crtc)249 container_of(x, struct vmw_display_unit, crtc)
245#define vmw_connector_to_du(x) \250#define vmw_connector_to_du(x) \
@@ -296,9 +301,10 @@ void vmw_kms_helper_buffer_finish(struct vmw_private *dev_priv, · 50 unmodified lines
296 struct drm_vmw_fence_rep __user *301 struct drm_vmw_fence_rep __user *
297 user_fence_rep);302 user_fence_rep);
298int vmw_kms_helper_resource_prepare(struct vmw_resource *res,303int vmw_kms_helper_resource_prepare(struct vmw_resource *res,
299 bool interruptible);304 bool interruptible,
300void vmw_kms_helper_resource_revert(struct vmw_resource *res);305 struct vmw_validation_ctx *ctx);
301void vmw_kms_helper_resource_finish(struct vmw_resource *res,306void vmw_kms_helper_resource_revert(struct vmw_validation_ctx *ctx);
307void vmw_kms_helper_resource_finish(struct vmw_validation_ctx *ctx,
302 struct vmw_fence_obj **out_fence);308 struct vmw_fence_obj **out_fence);
303int vmw_kms_readback(struct vmw_private *dev_priv,309int vmw_kms_readback(struct vmw_private *dev_priv,
304 struct drm_file *file_priv,310 struct drm_file *file_priv,
@@ -439,5 +445,4 @@ int vmw_kms_stdu_dma(struct vmw_private *dev_priv, · 134 unmodified lines
439 445
440int vmw_kms_set_config(struct drm_mode_set *set,446int vmw_kms_set_config(struct drm_mode_set *set,
441 struct drm_modeset_acquire_ctx *ctx);447 struct drm_modeset_acquire_ctx *ctx);
442
443#endif448#endif
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c+3−2
@@ -909,12 +909,13 @@ int vmw_kms_sou_do_surface_dirty(struct vmw_private *dev_priv, · 908 unmodified lines
909 struct vmw_framebuffer_surface *vfbs =909 struct vmw_framebuffer_surface *vfbs =
910 container_of(framebuffer, typeof(*vfbs), base);910 container_of(framebuffer, typeof(*vfbs), base);
911 struct vmw_kms_sou_surface_dirty sdirty;911 struct vmw_kms_sou_surface_dirty sdirty;
912 struct vmw_validation_ctx ctx;
912 int ret;913 int ret;
913 914
914 if (!srf)915 if (!srf)
915 srf = &vfbs->surface->res;916 srf = &vfbs->surface->res;
916 917
917 ret = vmw_kms_helper_resource_prepare(srf, true);918 ret = vmw_kms_helper_resource_prepare(srf, true, &ctx);
918 if (ret)919 if (ret)
919 return ret;920 return ret;
920 921
@@ -933,7 +934,7 @@ int vmw_kms_sou_do_surface_dirty(struct vmw_private *dev_priv, · 12 unmodified lines
933 ret = vmw_kms_helper_dirty(dev_priv, framebuffer, clips, vclips,934 ret = vmw_kms_helper_dirty(dev_priv, framebuffer, clips, vclips,
934 dest_x, dest_y, num_clips, inc,935 dest_x, dest_y, num_clips, inc,
935 &sdirty.base);936 &sdirty.base);
936 vmw_kms_helper_resource_finish(srf, out_fence);937 vmw_kms_helper_resource_finish(&ctx, out_fence);
937 938
938 return ret;939 return ret;
939}940}
drivers/gpu/drm/vmwgfx/vmwgfx_stdu.c+3−2
@@ -980,12 +980,13 @@ int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv, · 979 unmodified lines
980 struct vmw_framebuffer_surface *vfbs =980 struct vmw_framebuffer_surface *vfbs =
981 container_of(framebuffer, typeof(*vfbs), base);981 container_of(framebuffer, typeof(*vfbs), base);
982 struct vmw_stdu_dirty sdirty;982 struct vmw_stdu_dirty sdirty;
983 struct vmw_validation_ctx ctx;
983 int ret;984 int ret;
984 985
985 if (!srf)986 if (!srf)
986 srf = &vfbs->surface->res;987 srf = &vfbs->surface->res;
987 988
988 ret = vmw_kms_helper_resource_prepare(srf, true);989 ret = vmw_kms_helper_resource_prepare(srf, true, &ctx);
989 if (ret)990 if (ret)
990 return ret;991 return ret;
991 992
@@ -1008,7 +1009,7 @@ int vmw_kms_stdu_surface_dirty(struct vmw_private *dev_priv, · 16 unmodified lines
1008 dest_x, dest_y, num_clips, inc,1009 dest_x, dest_y, num_clips, inc,
1009 &sdirty.base);1010 &sdirty.base);
1010out_finish:1011out_finish:
1011 vmw_kms_helper_resource_finish(srf, out_fence);1012 vmw_kms_helper_resource_finish(&ctx, out_fence);
1012 1013
1013 return ret;1014 return ret;
1014}1015}
drivers/gpu/ipu-v3/ipu-prg.c+9−3
@@ -250,10 +250,14 @@ void ipu_prg_channel_disable(struct ipuv3_channel *ipu_chan) · 249 unmodified lines
250{250{
251 int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);251 int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);
252 struct ipu_prg *prg = ipu_chan->ipu->prg_priv;252 struct ipu_prg *prg = ipu_chan->ipu->prg_priv;
253 struct ipu_prg_channel *chan = &prg->chan[prg_chan];253 struct ipu_prg_channel *chan;
254 u32 val;254 u32 val;
255 255
256 if (!chan->enabled || prg_chan < 0)256 if (prg_chan < 0)
257 return;
258
259 chan = &prg->chan[prg_chan];
260 if (!chan->enabled)
257 return;261 return;
258 262
259 pm_runtime_get_sync(prg->dev);263 pm_runtime_get_sync(prg->dev);
@@ -280,13 +284,15 @@ int ipu_prg_channel_configure(struct ipuv3_channel *ipu_chan, · 20 unmodified lines
280{284{
281 int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);285 int prg_chan = ipu_prg_ipu_to_prg_chan(ipu_chan->num);
282 struct ipu_prg *prg = ipu_chan->ipu->prg_priv;286 struct ipu_prg *prg = ipu_chan->ipu->prg_priv;
283 struct ipu_prg_channel *chan = &prg->chan[prg_chan];287 struct ipu_prg_channel *chan;
284 u32 val;288 u32 val;
285 int ret;289 int ret;
286 290
287 if (prg_chan < 0)291 if (prg_chan < 0)
288 return prg_chan;292 return prg_chan;
289 293
294 chan = &prg->chan[prg_chan];
295
290 if (chan->enabled) {296 if (chan->enabled) {
291 ipu_pre_update(prg->pres[chan->used_pre], *eba);297 ipu_pre_update(prg->pres[chan->used_pre], *eba);
292 return 0;298 return 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t