Skip to content

Commit 0b5477d

Browse files
committed
Merge tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux
Pull drm fixes from Dave Airlie: "These iare the fixes for 4.13-rc3: vmwgfx, exynos, i915, amdgpu, nouveau, host1x and displayport fixes. As expected people woke up this week, i915 didn't do an -rc2 pull so got a bumper -rc3 pull, and Ben resurfaced on nouveau and fixed a bunch of major crashers seen on Fedora 26, and there are a few vmwgfx fixes as well. Otherwise exynos had some regression fixes/cleanups, and amdgpu has an rcu locking regression fix and a couple of minor fixes" * tag 'drm-fixes-for-v4.13-rc3' of git://people.freedesktop.org/~airlied/linux: (44 commits) drm/i915: Fix bad comparison in skl_compute_plane_wm. drm/i915: Force CPU synchronisation even if userspace requests ASYNC drm/i915: Only skip updating execobject.offset after error drm/i915: Only mark the execobject as pinned on success drm/i915: Remove assertion from raw __i915_vma_unpin() drm/i915/cnl: Fix loadgen select programming on ddi vswing sequence drm/i915: Fix scaler init during CRTC HW state readout drm/i915/selftests: Fix an error handling path in 'mock_gem_device()' drm/i915: Unbreak gpu reset vs. modeset locking gpu: host1x: Free the IOMMU domain when there is no device to attach drm/i915: Fix cursor updates on some platforms drm/i915: Fix user ptr check size in eb_relocate_vma() drm: exynos: mark pm functions as __maybe_unused drm/exynos: select CEC_CORE if CEC_NOTIFIER drm/exynos/hdmi: fix disable sequence drm/exynos: mic: add a bridge at probe drm/exynos/dsi: Remove error handling for bridge_node DT parsing drm/exynos: dsi: do not try to find bridge drm: exynos: hdmi: make of_device_ids const. drm: exynos: constify mixer_match_types and *_mxr_drv_data. ...
2 parents 0ce2f38 + 2080658 commit 0b5477d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+298
-229
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,16 @@ amdgpu_bo_list_get(struct amdgpu_fpriv *fpriv, int id)
198198
result = idr_find(&fpriv->bo_list_handles, id);
199199

200200
if (result) {
201-
if (kref_get_unless_zero(&result->refcount))
201+
if (kref_get_unless_zero(&result->refcount)) {
202+
rcu_read_unlock();
202203
mutex_lock(&result->lock);
203-
else
204+
} else {
205+
rcu_read_unlock();
204206
result = NULL;
207+
}
208+
} else {
209+
rcu_read_unlock();
205210
}
206-
rcu_read_unlock();
207211

208212
return result;
209213
}

drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1475,21 +1475,23 @@ static void gfx_v9_0_tiling_mode_table_init(struct amdgpu_device *adev)
14751475

14761476
static void gfx_v9_0_select_se_sh(struct amdgpu_device *adev, u32 se_num, u32 sh_num, u32 instance)
14771477
{
1478-
u32 data = REG_SET_FIELD(0, GRBM_GFX_INDEX, INSTANCE_BROADCAST_WRITES, 1);
1478+
u32 data;
14791479

1480-
if ((se_num == 0xffffffff) && (sh_num == 0xffffffff)) {
1481-
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SH_BROADCAST_WRITES, 1);
1482-
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_BROADCAST_WRITES, 1);
1483-
} else if (se_num == 0xffffffff) {
1484-
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SH_INDEX, sh_num);
1480+
if (instance == 0xffffffff)
1481+
data = REG_SET_FIELD(0, GRBM_GFX_INDEX, INSTANCE_BROADCAST_WRITES, 1);
1482+
else
1483+
data = REG_SET_FIELD(0, GRBM_GFX_INDEX, INSTANCE_INDEX, instance);
1484+
1485+
if (se_num == 0xffffffff)
14851486
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_BROADCAST_WRITES, 1);
1486-
} else if (sh_num == 0xffffffff) {
1487-
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SH_BROADCAST_WRITES, 1);
1487+
else
14881488
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_INDEX, se_num);
1489-
} else {
1489+
1490+
if (sh_num == 0xffffffff)
1491+
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SH_BROADCAST_WRITES, 1);
1492+
else
14901493
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SH_INDEX, sh_num);
1491-
data = REG_SET_FIELD(data, GRBM_GFX_INDEX, SE_INDEX, se_num);
1492-
}
1494+
14931495
WREG32_SOC15(GC, 0, mmGRBM_GFX_INDEX, data);
14941496
}
14951497

drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2128,15 +2128,9 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr)
21282128
pp_table->AvfsGbCksOff.m2_shift = 12;
21292129
pp_table->AvfsGbCksOff.b_shift = 0;
21302130

2131-
for (i = 0; i < dep_table->count; i++) {
2132-
if (dep_table->entries[i].sclk_offset == 0)
2133-
pp_table->StaticVoltageOffsetVid[i] = 248;
2134-
else
2135-
pp_table->StaticVoltageOffsetVid[i] =
2136-
(uint8_t)(dep_table->entries[i].sclk_offset *
2137-
VOLTAGE_VID_OFFSET_SCALE2 /
2138-
VOLTAGE_VID_OFFSET_SCALE1);
2139-
}
2131+
for (i = 0; i < dep_table->count; i++)
2132+
pp_table->StaticVoltageOffsetVid[i] =
2133+
convert_to_vid((uint8_t)(dep_table->entries[i].sclk_offset));
21402134

21412135
if ((PPREGKEY_VEGA10QUADRATICEQUATION_DFLT !=
21422136
data->disp_clk_quad_eqn_a) &&

drivers/gpu/drm/drm_dp_helper.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
544544
DP_DETAILED_CAP_INFO_AVAILABLE;
545545
int clk;
546546
int bpc;
547-
char id[6];
547+
char id[7];
548548
int len;
549549
uint8_t rev[2];
550550
int type = port_cap[0] & DP_DS_PORT_TYPE_MASK;
@@ -583,6 +583,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
583583
seq_puts(m, "\t\tType: N/A\n");
584584
}
585585

586+
memset(id, 0, sizeof(id));
586587
drm_dp_downstream_id(aux, id);
587588
seq_printf(m, "\t\tID: %s\n", id);
588589

@@ -591,7 +592,7 @@ void drm_dp_downstream_debug(struct seq_file *m,
591592
seq_printf(m, "\t\tHW: %d.%d\n",
592593
(rev[0] & 0xf0) >> 4, rev[0] & 0xf);
593594

594-
len = drm_dp_dpcd_read(aux, DP_BRANCH_SW_REV, &rev, 2);
595+
len = drm_dp_dpcd_read(aux, DP_BRANCH_SW_REV, rev, 2);
595596
if (len > 0)
596597
seq_printf(m, "\t\tSW: %d.%d\n", rev[0], rev[1]);
597598

drivers/gpu/drm/exynos/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ config DRM_EXYNOS_DP
7575
config DRM_EXYNOS_HDMI
7676
bool "HDMI"
7777
depends on DRM_EXYNOS_MIXER || DRM_EXYNOS5433_DECON
78+
select CEC_CORE if CEC_NOTIFIER
7879
help
7980
Choose this option if you want to use Exynos HDMI for DRM.
8081

drivers/gpu/drm/exynos/exynos_drm_drv.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,6 @@ static int exynos_drm_platform_probe(struct platform_device *pdev)
453453
struct component_match *match;
454454

455455
pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
456-
exynos_drm_driver.num_ioctls = ARRAY_SIZE(exynos_ioctls);
457456

458457
match = exynos_drm_match_add(&pdev->dev);
459458
if (IS_ERR(match))

drivers/gpu/drm/exynos/exynos_drm_dsi.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,8 +1651,6 @@ static int exynos_dsi_parse_dt(struct exynos_dsi *dsi)
16511651
return ret;
16521652

16531653
dsi->bridge_node = of_graph_get_remote_node(node, DSI_PORT_IN, 0);
1654-
if (!dsi->bridge_node)
1655-
return -EINVAL;
16561654

16571655
return 0;
16581656
}
@@ -1687,9 +1685,11 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
16871685
return ret;
16881686
}
16891687

1690-
bridge = of_drm_find_bridge(dsi->bridge_node);
1691-
if (bridge)
1692-
drm_bridge_attach(encoder, bridge, NULL);
1688+
if (dsi->bridge_node) {
1689+
bridge = of_drm_find_bridge(dsi->bridge_node);
1690+
if (bridge)
1691+
drm_bridge_attach(encoder, bridge, NULL);
1692+
}
16931693

16941694
return mipi_dsi_host_register(&dsi->dsi_host);
16951695
}

drivers/gpu/drm/exynos/exynos_drm_mic.c

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -340,16 +340,10 @@ static int exynos_mic_bind(struct device *dev, struct device *master,
340340
void *data)
341341
{
342342
struct exynos_mic *mic = dev_get_drvdata(dev);
343-
int ret;
344343

345-
mic->bridge.funcs = &mic_bridge_funcs;
346-
mic->bridge.of_node = dev->of_node;
347344
mic->bridge.driver_private = mic;
348-
ret = drm_bridge_add(&mic->bridge);
349-
if (ret)
350-
DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
351345

352-
return ret;
346+
return 0;
353347
}
354348

355349
static void exynos_mic_unbind(struct device *dev, struct device *master,
@@ -365,8 +359,6 @@ static void exynos_mic_unbind(struct device *dev, struct device *master,
365359

366360
already_disabled:
367361
mutex_unlock(&mic_mutex);
368-
369-
drm_bridge_remove(&mic->bridge);
370362
}
371363

372364
static const struct component_ops exynos_mic_component_ops = {
@@ -461,6 +453,15 @@ static int exynos_mic_probe(struct platform_device *pdev)
461453

462454
platform_set_drvdata(pdev, mic);
463455

456+
mic->bridge.funcs = &mic_bridge_funcs;
457+
mic->bridge.of_node = dev->of_node;
458+
459+
ret = drm_bridge_add(&mic->bridge);
460+
if (ret) {
461+
DRM_ERROR("mic: Failed to add MIC to the global bridge list\n");
462+
return ret;
463+
}
464+
464465
pm_runtime_enable(dev);
465466

466467
ret = component_add(dev, &exynos_mic_component_ops);
@@ -479,8 +480,13 @@ static int exynos_mic_probe(struct platform_device *pdev)
479480

480481
static int exynos_mic_remove(struct platform_device *pdev)
481482
{
483+
struct exynos_mic *mic = platform_get_drvdata(pdev);
484+
482485
component_del(&pdev->dev, &exynos_mic_component_ops);
483486
pm_runtime_disable(&pdev->dev);
487+
488+
drm_bridge_remove(&mic->bridge);
489+
484490
return 0;
485491
}
486492

drivers/gpu/drm/exynos/exynos_hdmi.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1501,8 +1501,6 @@ static void hdmi_disable(struct drm_encoder *encoder)
15011501
*/
15021502
cancel_delayed_work(&hdata->hotplug_work);
15031503
cec_notifier_set_phys_addr(hdata->notifier, CEC_PHYS_ADDR_INVALID);
1504-
1505-
hdmiphy_disable(hdata);
15061504
}
15071505

15081506
static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {
@@ -1676,7 +1674,7 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
16761674
return hdmi_bridge_init(hdata);
16771675
}
16781676

1679-
static struct of_device_id hdmi_match_types[] = {
1677+
static const struct of_device_id hdmi_match_types[] = {
16801678
{
16811679
.compatible = "samsung,exynos4210-hdmi",
16821680
.data = &exynos4210_hdmi_driver_data,
@@ -1934,8 +1932,7 @@ static int hdmi_remove(struct platform_device *pdev)
19341932
return 0;
19351933
}
19361934

1937-
#ifdef CONFIG_PM
1938-
static int exynos_hdmi_suspend(struct device *dev)
1935+
static int __maybe_unused exynos_hdmi_suspend(struct device *dev)
19391936
{
19401937
struct hdmi_context *hdata = dev_get_drvdata(dev);
19411938

@@ -1944,7 +1941,7 @@ static int exynos_hdmi_suspend(struct device *dev)
19441941
return 0;
19451942
}
19461943

1947-
static int exynos_hdmi_resume(struct device *dev)
1944+
static int __maybe_unused exynos_hdmi_resume(struct device *dev)
19481945
{
19491946
struct hdmi_context *hdata = dev_get_drvdata(dev);
19501947
int ret;
@@ -1955,7 +1952,6 @@ static int exynos_hdmi_resume(struct device *dev)
19551952

19561953
return 0;
19571954
}
1958-
#endif
19591955

19601956
static const struct dev_pm_ops exynos_hdmi_pm_ops = {
19611957
SET_RUNTIME_PM_OPS(exynos_hdmi_suspend, exynos_hdmi_resume, NULL)

drivers/gpu/drm/exynos/exynos_mixer.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,28 +1094,28 @@ static const struct exynos_drm_crtc_ops mixer_crtc_ops = {
10941094
.atomic_check = mixer_atomic_check,
10951095
};
10961096

1097-
static struct mixer_drv_data exynos5420_mxr_drv_data = {
1097+
static const struct mixer_drv_data exynos5420_mxr_drv_data = {
10981098
.version = MXR_VER_128_0_0_184,
10991099
.is_vp_enabled = 0,
11001100
};
11011101

1102-
static struct mixer_drv_data exynos5250_mxr_drv_data = {
1102+
static const struct mixer_drv_data exynos5250_mxr_drv_data = {
11031103
.version = MXR_VER_16_0_33_0,
11041104
.is_vp_enabled = 0,
11051105
};
11061106

1107-
static struct mixer_drv_data exynos4212_mxr_drv_data = {
1107+
static const struct mixer_drv_data exynos4212_mxr_drv_data = {
11081108
.version = MXR_VER_0_0_0_16,
11091109
.is_vp_enabled = 1,
11101110
};
11111111

1112-
static struct mixer_drv_data exynos4210_mxr_drv_data = {
1112+
static const struct mixer_drv_data exynos4210_mxr_drv_data = {
11131113
.version = MXR_VER_0_0_0_16,
11141114
.is_vp_enabled = 1,
11151115
.has_sclk = 1,
11161116
};
11171117

1118-
static struct of_device_id mixer_match_types[] = {
1118+
static const struct of_device_id mixer_match_types[] = {
11191119
{
11201120
.compatible = "samsung,exynos4210-mixer",
11211121
.data = &exynos4210_mxr_drv_data,

0 commit comments

Comments
 (0)