4.18.8-stable review
Subsystems (4)
Greg Kroah-Hartman
maintainerPATCH 159/197 drm/amd/pp: Convert voltage unit in mV*4 to mV on CZ/ST
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rex Zhu <[email protected]>
commit 8a50bb47a863c3cb8950a2e810448c9a82a9d446 upstream.
the voltage showed in debugfs and hwmon should be in mV
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c +3 -2
@@ -244,6 +244,7 @@ static int smu8_initialize_dpm_defaults(return 0 ; } +/* convert form 8bit vid to real voltage in mV*4 */ static uint32_t smu8_convert_8Bit_index_to_voltage (struct pp_hwmgr *hwmgr,uint16_t voltage) {
@@ -1702,13 +1703,13 @@ static int smu8_read_sensor(struct pp_hwcase AMDGPU_PP_SENSOR_VDDNB : tmp = (cgs_read_ind_register (hwmgr->device,CGS_IND_REG__SMC , ixSMUSVI_NB_CURRENTVID) &CURRENT_NB_VID_MASK ) >>CURRENT_NB_VID__SHIFT ; - vddnb =smu8_convert_8Bit_index_to_voltage (hwmgr, tmp); + vddnb =smu8_convert_8Bit_index_to_voltage (hwmgr, tmp) /4 ; *((uint32_t *)value) = vddnb;return 0 ;case AMDGPU_PP_SENSOR_VDDGFX : tmp = (cgs_read_ind_register (hwmgr->device,CGS_IND_REG__SMC , ixSMUSVI_GFX_CURRENTVID) &CURRENT_GFX_VID_MASK ) >>CURRENT_GFX_VID__SHIFT ; - vddgfx =smu8_convert_8Bit_index_to_voltage (hwmgr, (u16 )tmp); + vddgfx =smu8_convert_8Bit_index_to_voltage (hwmgr, (u16 )tmp) /4 ; *((uint32_t *)value) = vddgfx;return 0 ;case AMDGPU_PP_SENSOR_UVD_VCLK :
Greg Kroah-Hartman
maintainerPATCH 160/197 drm/amd/powerplay: fixed uninitialized value
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Evan Quan <[email protected]>
commit 1ce0688f3f6a9e9d34ae66bf779d54855def7bec upstream.
The 'result' is not initialized correctly. It causes the API return an error code even on success.
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c +1 -1
@@ -490,7 +490,7 @@ static int vega12_get_number_dpm_level(sstatic int vega12_get_dpm_frequency_by_index (struct pp_hwmgr *hwmgr,PPCLK_e clkID,uint32_t index,uint32_t *clock) { -int result; +int result =0 ;/* *SMU expects the Clock ID to be in the top 16 bits.
Greg Kroah-Hartman
maintainerPATCH 161/197 drm/amd/pp/Polaris12: Fix a chunk of registers missed to program
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rex Zhu <[email protected]>
commit 2d227ec2c11c568910299e8f913bac2dda47397c upstream.
DIDTConfig_Polaris12[] table missed a big chunk of data.
Pointed by aidan.fabius <[email protected]>
--- drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+)
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_powertune.c +43 -0
@@ -403,6 +403,49 @@ static const struct gpu_pt_config_reg DI { ixDIDT_SQ_CTRL1, DIDT_SQ_CTRL1__MAX_POWER_MASK, DIDT_SQ_CTRL1__MAX_POWER__SHIFT, 0xffff, GPU_CONFIGREG_DIDT_IND }, { ixDIDT_SQ_CTRL_OCP, DIDT_SQ_CTRL_OCP__UNUSED_0_MASK, DIDT_SQ_CTRL_OCP__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL_OCP, DIDT_SQ_CTRL_OCP__OCP_MAX_POWER_MASK, DIDT_SQ_CTRL_OCP__OCP_MAX_POWER__SHIFT, 0xffff, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__MAX_POWER_DELTA_MASK, DIDT_SQ_CTRL2__MAX_POWER_DELTA__SHIFT, 0x3853, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__UNUSED_0_MASK, DIDT_SQ_CTRL2__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__SHORT_TERM_INTERVAL_SIZE_MASK, DIDT_SQ_CTRL2__SHORT_TERM_INTERVAL_SIZE__SHIFT, 0x005a, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__UNUSED_1_MASK, DIDT_SQ_CTRL2__UNUSED_1__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__LONG_TERM_INTERVAL_RATIO_MASK, DIDT_SQ_CTRL2__LONG_TERM_INTERVAL_RATIO__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL2, DIDT_SQ_CTRL2__UNUSED_2_MASK, DIDT_SQ_CTRL2__UNUSED_2__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_SQ_STALL_CTRL, DIDT_SQ_STALL_CTRL__DIDT_STALL_CTRL_ENABLE_MASK, DIDT_SQ_STALL_CTRL__DIDT_STALL_CTRL_ENABLE__SHIFT, 0x0001, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_STALL_CTRL, DIDT_SQ_STALL_CTRL__DIDT_STALL_DELAY_HI_MASK, DIDT_SQ_STALL_CTRL__DIDT_STALL_DELAY_HI__SHIFT, 0x0001, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_STALL_CTRL, DIDT_SQ_STALL_CTRL__DIDT_STALL_DELAY_LO_MASK, DIDT_SQ_STALL_CTRL__DIDT_STALL_DELAY_LO__SHIFT, 0x0001, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_STALL_CTRL, DIDT_SQ_STALL_CTRL__DIDT_HI_POWER_THRESHOLD_MASK, DIDT_SQ_STALL_CTRL__DIDT_HI_POWER_THRESHOLD__SHIFT, 0x0ebb, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_STALL_CTRL, DIDT_SQ_STALL_CTRL__UNUSED_0_MASK, DIDT_SQ_STALL_CTRL__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_SQ_TUNING_CTRL, DIDT_SQ_TUNING_CTRL__DIDT_TUNING_ENABLE_MASK, DIDT_SQ_TUNING_CTRL__DIDT_TUNING_ENABLE__SHIFT, 0x0001, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_TUNING_CTRL, DIDT_SQ_TUNING_CTRL__MAX_POWER_DELTA_HI_MASK, DIDT_SQ_TUNING_CTRL__MAX_POWER_DELTA_HI__SHIFT, 0x3853, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_TUNING_CTRL, DIDT_SQ_TUNING_CTRL__MAX_POWER_DELTA_LO_MASK, DIDT_SQ_TUNING_CTRL__MAX_POWER_DELTA_LO__SHIFT, 0x3153, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_TUNING_CTRL, DIDT_SQ_TUNING_CTRL__UNUSED_0_MASK, DIDT_SQ_TUNING_CTRL__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__DIDT_CTRL_EN_MASK, DIDT_SQ_CTRL0__DIDT_CTRL_EN__SHIFT, 0x0001, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__USE_REF_CLOCK_MASK, DIDT_SQ_CTRL0__USE_REF_CLOCK__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__PHASE_OFFSET_MASK, DIDT_SQ_CTRL0__PHASE_OFFSET__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__DIDT_CTRL_RST_MASK, DIDT_SQ_CTRL0__DIDT_CTRL_RST__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__DIDT_CLK_EN_OVERRIDE_MASK, DIDT_SQ_CTRL0__DIDT_CLK_EN_OVERRIDE__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__DIDT_MAX_STALLS_ALLOWED_HI_MASK, DIDT_SQ_CTRL0__DIDT_MAX_STALLS_ALLOWED_HI__SHIFT, 0x0010, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__DIDT_MAX_STALLS_ALLOWED_LO_MASK, DIDT_SQ_CTRL0__DIDT_MAX_STALLS_ALLOWED_LO__SHIFT, 0x0010, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_SQ_CTRL0, DIDT_SQ_CTRL0__UNUSED_0_MASK, DIDT_SQ_CTRL0__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_TD_WEIGHT0_3, DIDT_TD_WEIGHT0_3__WEIGHT0_MASK, DIDT_TD_WEIGHT0_3__WEIGHT0__SHIFT, 0x000a, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT0_3, DIDT_TD_WEIGHT0_3__WEIGHT1_MASK, DIDT_TD_WEIGHT0_3__WEIGHT1__SHIFT, 0x0010, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT0_3, DIDT_TD_WEIGHT0_3__WEIGHT2_MASK, DIDT_TD_WEIGHT0_3__WEIGHT2__SHIFT, 0x0017, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT0_3, DIDT_TD_WEIGHT0_3__WEIGHT3_MASK, DIDT_TD_WEIGHT0_3__WEIGHT3__SHIFT, 0x002f, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_TD_WEIGHT4_7, DIDT_TD_WEIGHT4_7__WEIGHT4_MASK, DIDT_TD_WEIGHT4_7__WEIGHT4__SHIFT, 0x0046, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT4_7, DIDT_TD_WEIGHT4_7__WEIGHT5_MASK, DIDT_TD_WEIGHT4_7__WEIGHT5__SHIFT, 0x005d, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT4_7, DIDT_TD_WEIGHT4_7__WEIGHT6_MASK, DIDT_TD_WEIGHT4_7__WEIGHT6__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_WEIGHT4_7, DIDT_TD_WEIGHT4_7__WEIGHT7_MASK, DIDT_TD_WEIGHT4_7__WEIGHT7__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_TD_CTRL1, DIDT_TD_CTRL1__MIN_POWER_MASK, DIDT_TD_CTRL1__MIN_POWER__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, + { ixDIDT_TD_CTRL1, DIDT_TD_CTRL1__MAX_POWER_MASK, DIDT_TD_CTRL1__MAX_POWER__SHIFT, 0xffff, GPU_CONFIGREG_DIDT_IND }, + + { ixDIDT_TD_CTRL_OCP, DIDT_TD_CTRL_OCP__UNUSED_0_MASK, DIDT_TD_CTRL_OCP__UNUSED_0__SHIFT, 0x0000, GPU_CONFIGREG_DIDT_IND }, { ixDIDT_TD_CTRL_OCP, DIDT_TD_CTRL_OCP__OCP_MAX_POWER_MASK, DIDT_TD_CTRL_OCP__OCP_MAX_POWER__SHIFT, 0x00ff, GPU_CONFIGREG_DIDT_IND }, { ixDIDT_TD_CTRL2, DIDT_TD_CTRL2__MAX_POWER_DELTA_MASK, DIDT_TD_CTRL2__MAX_POWER_DELTA__SHIFT, 0x3fff, GPU_CONFIGREG_DIDT_IND },
Greg Kroah-Hartman
maintainerPATCH 162/197 drm/edid: Quirk Vive Pro VR headset non-desktop.
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Lubosz Sarnecki <[email protected]>
commit 6931317c714885f2d792e8150ef6715d416ac681 upstream.
This adds the Vive Pro's EDID information and
sets EDID_QUIRK_NON_DESKTOP.
--- drivers/gpu/drm/drm_edid.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/drm_edid.c +2 -1
@@ -163,8 +163,9 @@ static const struct edid_quirk {/* Rotel RSX-1058 forwards sink's EDID but only does HDMI 1.1*/ { "ETR", 13896, EDID_QUIRK_FORCE_8BPC }, -/* HTC Vive VR Headset */ +/* HTC Vive and Vive Pro VR Headsets */ { "HVR", 0xaa01, EDID_QUIRK_NON_DESKTOP }, + { "HVR", 0xaa02, EDID_QUIRK_NON_DESKTOP },/* Oculus Rift DK1, DK2, and CV1 VR Headsets */ { "OVR", 0x0001, EDID_QUIRK_NON_DESKTOP },
Greg Kroah-Hartman
maintainerPATCH 164/197 drm/amd/display: fix type of variable
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo A. R. Silva <[email protected]>
commit fe78627d430435d22316fe39f2012ece31bf23c2 upstream.
Currently, the maximum value that *counter* can reach is 255, and code at line 150: while (counter < 1000) { implies a bigger value could be expected.
Fix this by changing the type of variable *counter* from uint8_t to uint16_t.
Addresses-Coverity-ID: 1470030 ("Operands don't affect result")
--- drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c +1 -1
@@ -143,7 +143,7 @@ static void wait_for_fbc_state_changed(struct dce110_compressor *cp110, bool enabled) { - uint8_t counter = 0; + uint16_t counter = 0;uint32_t addr = mmFBC_STATUS;uint32_t value;
Greg Kroah-Hartman
maintainerPATCH 165/197 drm/amd/display: Dont share clk source between DP and HDMI
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikita Lipski <[email protected]>
commit 3e27e10e2ecee0d3a0083f8ae76354ac9c6ad15c upstream.
[why]
Prevent clock source sharing between HDMI and DP connectors. DP shouldn't be sharing its ref clock with phy clock, which caused an issue of older ASICS booting up with multiple diplays plugged in.
[how]
Add an extra check that would prevent HDMI and DP sharing clk.
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 22 +++++++++++++++- drivers/gpu/drm/amd/display/dc/dc.h | 1 drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c | 2 - drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c | 3 ++ 4 files changed, 26 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +21 -1
@@ -330,6 +330,9 @@ bool resource_are_streams_timing_synchro != stream2->timing.pix_clk_khz)return false; +if (stream1->clamping.c_depth != stream2->clamping.c_depth) +return false; +if (stream1->phy_pix_clk != stream2->phy_pix_clk && (!dc_is_dp_signal (stream1->signal) || !dc_is_dp_signal (stream2->signal)))
@@ -337,6 +340,20 @@ bool resource_are_streams_timing_synchroreturn true; } +static bool is_dp_and_hdmi_sharable ( +struct dc_stream_state *stream1, +struct dc_stream_state *stream2) +{ +if (stream1->ctx->dc->caps.disable_dp_clk_share) +return false; + +if (stream1->clamping.c_depth !=COLOR_DEPTH_888 || + stream2->clamping.c_depth !=COLOR_DEPTH_888 ) +return false; + +return true; + +} static bool is_sharable_clk_src( const struct pipe_ctx *pipe_with_clk_src,
@@ -348,7 +365,10 @@ static bool is_sharable_clk_src(if (pipe_with_clk_src->stream->signal ==SIGNAL_TYPE_VIRTUAL )return false; -if (dc_is_dp_signal (pipe_with_clk_src->stream->signal)) +if (dc_is_dp_signal (pipe_with_clk_src->stream->signal) || + (dc_is_dp_signal (pipe->stream->signal) && + !is_dp_and_hdmi_sharable (pipe_with_clk_src->stream, + pipe->stream)))return false; if (dc_is_hdmi_signal(pipe_with_clk_src->stream->signal)
drivers/gpu/drm/amd/display/dc/dc.h +1 -0
@@ -77,6 +77,7 @@ struct dc_caps {bool dual_link_dvi;bool post_blend_color_processing;bool force_dp_tps4_for_cp2520; +bool disable_dp_clk_share; };struct dc_dcc_surface_param {
drivers/gpu/drm/amd/display/dc/dce100/dce100_resource.c +1 -1
@@ -884,7 +884,7 @@ static bool construct( dc->caps.i2c_speed_in_khz =40 ; dc->caps.max_cursor_size =128 ; dc->caps.dual_link_dvi = true; - + dc->caps.disable_dp_clk_share = true;for (i =0 ; i < pool->base.pipe_count; i++) { pool->base.timing_generators[i] = dce100_timing_generator_create(
drivers/gpu/drm/amd/display/dc/dce80/dce80_resource.c +3 -0
@@ -902,6 +902,7 @@ static bool dce80_construct( } dc->caps.max_planes = pool->base.pipe_count; + dc->caps.disable_dp_clk_share = true;if (!resource_construct (num_virtual_links, dc, &pool->base, &res_create_funcs))
@@ -1087,6 +1088,7 @@ static bool dce81_construct( } dc->caps.max_planes = pool->base.pipe_count; + dc->caps.disable_dp_clk_share = true;if (!resource_construct (num_virtual_links, dc, &pool->base, &res_create_funcs))
@@ -1268,6 +1270,7 @@ static bool dce83_construct( } dc->caps.max_planes = pool->base.pipe_count; + dc->caps.disable_dp_clk_share = true;if (!resource_construct (num_virtual_links, dc, &pool->base, &res_create_funcs))
Greg Kroah-Hartman
maintainerPATCH 166/197 drm/amd/display: update clk for various HDMI color depths
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikita Lipski <[email protected]>
commit 81aca8e75c1b046865fb2badef95a0dcff6f73de upstream.
[why]
When programming tonga's connector's backend we didn't take in account that HDMI's colour depth might be more than 8bpc therefore we need to add a switch statement that would adjust the pixel clock accordingly.
[how]
Add a switch statement updating clock by its appropriate coefficient.
--- drivers/gpu/drm/amd/display/dc/bios/command_table.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/amd/display/dc/bios/command_table.c +18 -0
@@ -808,6 +808,24 @@ static enum bp_result transmitter_contro* (=1: 8bpp, =1.25: 10bpp, =1.5:12bpp, =2: 16bpp) * LVDS mode: usPixelClock = pixel clock */ +if (cntl->signal ==SIGNAL_TYPE_HDMI_TYPE_A ) { +switch (cntl->color_depth) { +case COLOR_DEPTH_101010 : + params.usSymClock = +cpu_to_le16 ((le16_to_cpu (params.usSymClock) *30 ) /24 ); +break ; +case COLOR_DEPTH_121212 : + params.usSymClock = +cpu_to_le16 ((le16_to_cpu (params.usSymClock) *36 ) /24 ); +break ; +case COLOR_DEPTH_161616 : + params.usSymClock = +cpu_to_le16 ((le16_to_cpu (params.usSymClock) *48 ) /24 ); +break ; +default : +break ; + } + }if (EXEC_BIOS_CMD_TABLE (UNIPHYTransmitterControl, params)) result =BP_RESULT_OK ;
Greg Kroah-Hartman
maintainerPATCH 149/197 btrfs: lift uuid_mutex to callers of btrfs_parse_early_options
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Sterba <[email protected]>
[ Upstream commit 5139cff598d42b1e531f40c84691a7e945f04553 ]
Prepartory work to fix race between mount and device scan.
btrfs_parse_early_options calls the device scan from mount and we'll need to let mount completely manage the critical section.
--- fs/btrfs/super.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
fs/btrfs/super.c +4 -2
@@ -892,6 +892,8 @@ static int btrfs_parse_early_options(conchar *device_name, *opts, *orig, *p;int error =0 ; +lockdep_assert_held (&uuid_mutex); +if (!options)return 0 ;
@@ -917,10 +919,8 @@ static int btrfs_parse_early_options(con error = -ENOMEM ; goto out; } -mutex_lock (&uuid_mutex); error =btrfs_scan_one_device (device_name, flags, holder, fs_devices); -mutex_unlock (&uuid_mutex);kfree (device_name);if (error) goto out;
@@ -1528,8 +1528,10 @@ static struct dentry *btrfs_mount_root(sif (!(flags &SB_RDONLY )) mode |=FMODE_WRITE ; +mutex_lock (&uuid_mutex); error =btrfs_parse_early_options (data, mode, fs_type, &fs_devices); +mutex_unlock (&uuid_mutex);if (error) {return ERR_PTR (error); }
Greg Kroah-Hartman
maintainerPATCH 169/197 drm/rockchip: lvds: add missing of_node_put
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Julia Lawall <[email protected]>
commit ebfb081edc8afd250a6d290c37481bfb2262e7cb upstream.
The device node iterators perform an of_node_get on each iteration, so a jump out of the loop requires an of_node_put.
The semantic patch that fixes this problem is as follows
(http://coccinelle.lip6.fr):
// <smpl>
@@
expression root,e;
local idexpression child;
iterator name for_each_child_of_node;
@@
for_each_child_of_node(root, child) {
... when != of_node_put(child)
when != e = child
+ of_node_put(child);
? break;
...
}
... when != child
// </smpl>
--- drivers/gpu/drm/rockchip/rockchip_lvds.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/rockchip/rockchip_lvds.c +3 -1
@@ -363,8 +363,10 @@ static int rockchip_lvds_bind(struct devof_property_read_u32 (endpoint,"reg" , &endpoint_id); ret =drm_of_find_panel_or_bridge (dev->of_node,1 , endpoint_id, &lvds->panel, &lvds->bridge); -if (!ret) +if (!ret) { +of_node_put (endpoint);break ; + } }if (!child_count) {DRM_DEV_ERROR (dev,"lvds port does not have any children\n" );
Greg Kroah-Hartman
maintainerPATCH 170/197 drm/rockchip: vop: split out core clock enablement into separate functions
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Heiko Stuebner <[email protected]>
commit e2810a7167df14c762e085fae5aade38425b71bf upstream.
Judging from the iommu code, both the hclk and aclk are necessary for register access. Split them off into separate functions from the regular vop enablement, so that we can use them elsewhere as well.
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 44 +++++++++++++++++++--------- 1 file changed, 31 insertions(+), 13 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +31 -13
@@ -486,6 +486,31 @@ static void vop_line_flag_irq_disable(stspin_unlock_irqrestore (&vop->irq_lock, flags); } +static int vop_core_clks_enable (struct vop *vop) +{ +int ret; + + ret =clk_enable (vop->hclk); +if (ret <0 ) +return ret; + + ret =clk_enable (vop->aclk); +if (ret <0 ) + goto err_disable_hclk; + +return 0 ; + +err_disable_hclk: +clk_disable (vop->hclk); +return ret; +} + +static void vop_core_clks_disable (struct vop *vop) +{ +clk_disable (vop->aclk); +clk_disable (vop->hclk); +} +static int vop_enable (struct drm_crtc *crtc) {struct vop *vop =to_vop (crtc);
@@ -497,17 +522,13 @@ static int vop_enable(struct drm_crtc *creturn ret; } - ret =clk_enable (vop->hclk); + ret =vop_core_clks_enable (vop);if (WARN_ON (ret <0 )) goto err_put_pm_runtime; ret =clk_enable (vop->dclk);if (WARN_ON (ret <0 )) - goto err_disable_hclk; - - ret =clk_enable (vop->aclk); -if (WARN_ON (ret <0 )) - goto err_disable_dclk; + goto err_disable_core;/* * Slave iommu shares power, irq and clock with vop. It was associated
@@ -519,7 +540,7 @@ static int vop_enable(struct drm_crtc *cif (ret) {DRM_DEV_ERROR (vop->dev,"failed to attach dma mapping, %d\n" , ret); - goto err_disable_aclk; + goto err_disable_dclk; }spin_lock (&vop->reg_lock);
@@ -558,12 +579,10 @@ static int vop_enable(struct drm_crtc *creturn 0 ; -err_disable_aclk: -clk_disable (vop->aclk); err_disable_dclk:clk_disable (vop->dclk); -err_disable_hclk: -clk_disable (vop->hclk); +err_disable_core: +vop_core_clks_disable (vop); err_put_pm_runtime:pm_runtime_put_sync (vop->dev);return ret;
@@ -609,8 +628,7 @@ static void vop_crtc_atomic_disable(strurockchip_drm_dma_detach_device (vop->drm_dev, vop->dev);clk_disable (vop->dclk); -clk_disable (vop->aclk); -clk_disable (vop->hclk); +vop_core_clks_disable (vop);pm_runtime_put (vop->dev);mutex_unlock (&vop->vop_lock);
Greg Kroah-Hartman
maintainerPATCH 171/197 drm/rockchip: vop: fix irq disabled after vop driver probed
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Sandy Huang <[email protected]>
commit 6456314ff1de246414a43e3132075b70b3e050ac upstream.
The vop irq is shared between vop and iommu and irq probing in the iommu driver moved to the probe function recently. This can in some cases lead to a stall if the irq is triggered while the vop driver still has it disabled, but the vop irq handler gets called.
But there is no real need to disable the irq, as the vop can simply also track its enabled state and ignore irqs in that case. For this we can simply check the power-domain state of the vop, similar to how the iommu driver does it.
So remove the enable/disable handling and add appropriate condition to the irq handler.
changes in v2:
- move to just check the power-domain state
- add clock handling
changes in v3:
- clarify comment to speak of runtime-pm not power-domain changes in v4:
- address Marc's comments (clk-enable WARN_ON and style improvement)
--- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-)
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +17 -8
@@ -573,8 +573,6 @@ static int vop_enable(struct drm_crtc *cspin_unlock (&vop->reg_lock); -enable_irq (vop->irq); -drm_crtc_vblank_on (crtc);return 0 ;
@@ -618,8 +616,6 @@ static void vop_crtc_atomic_disable(struvop_dsp_hold_valid_irq_disable (vop); -disable_irq (vop->irq); - vop->is_enabled = false;/*
@@ -1196,6 +1192,18 @@ static irqreturn_t vop_isr(int irq, voidint ret =IRQ_NONE ;/* +* The irq is shared with the iommu. If the runtime-pm state of the +* vop-device is disabled the irq has to be targeted at the iommu. +*/ +if (!pm_runtime_get_if_in_use (vop->dev)) +return IRQ_NONE ; + +if (vop_core_clks_enable (vop)) { +DRM_DEV_ERROR_RATELIMITED (vop->dev,"couldn't enable clocks\n" ); + goto out; + } + +/* * interrupt register has interrupt status, enable and clear bits, we * must hold irq_lock to avoid a race with enable/disable_vblank(). */
@@ -1210,7 +1218,7 @@ static irqreturn_t vop_isr(int irq, void/* This is expected for vop iommu irqs, since the irq is shared */ if (!active_irqs) -return IRQ_NONE ; + goto out_disable;if (active_irqs &DSP_HOLD_VALID_INTR ) {complete (&vop->dsp_hold_completion);
@@ -1236,6 +1244,10 @@ static irqreturn_t vop_isr(int irq, voidDRM_DEV_ERROR (vop->dev,"Unknown VOP IRQs: %#02x\n" , active_irqs); +out_disable: +vop_core_clks_disable (vop); +out: +pm_runtime_put (vop->dev);return ret; }
@@ -1614,9 +1626,6 @@ static int vop_bind(struct device *dev,if (ret) goto err_disable_pm_runtime; -/* IRQ is initially disabled; it gets enabled in power_on */ -disable_irq (vop->irq); -return 0 ; err_disable_pm_runtime:
Greg Kroah-Hartman
maintainerPATCH 172/197 drm/amd/display: Pass connector id when executing VBIOS CT
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikita Lipski <[email protected]>
commit 433149130c31de3f63b17b4ce08b45dab208f7e8 upstream.
[why]
Older ASICs require both phys_id and connector_id to execute bios command table. If we are not passing the right connector_id - it can lead to a black screen.
[how]
Set connector_obj_id when executing vbios command table
--- drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c +2 -2
@@ -919,7 +919,7 @@ void dce110_link_encoder_enable_tmds_outenum bp_result result;/* Enable the PHY */ - + cntl.connector_obj_id = enc110->base.connector; cntl.action =TRANSMITTER_CONTROL_ENABLE ; cntl.engine_id = enc->preferred_engine; cntl.transmitter = enc110->base.transmitter;
@@ -961,7 +961,7 @@ void dce110_link_encoder_enable_dp_outpu* We need to set number of lanes manually. */ configure_encoder (enc110, link_settings); - + cntl.connector_obj_id = enc110->base.connector; cntl.action =TRANSMITTER_CONTROL_ENABLE ; cntl.engine_id = enc->preferred_engine; cntl.transmitter = enc110->base.transmitter;
Greg Kroah-Hartman
maintainerPATCH 173/197 drm/amd/display: Check if clock source in use before disabling
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mikita Lipski <[email protected]>
commit ad8960a6cb06c446d0a391ce095f6f28edf36aff upstream.
[why]
We are disabling clock source while other pipes are still using it, because we don't verify the number of pipes that share it.
[how]
- Adding a function in resources to return the number of pipes sharing the clock source.
- Checking that no one is sharing the clock source before disabling
--- drivers/gpu/drm/amd/display/dc/core/dc_resource.c | 46 ++++++++---- drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 - drivers/gpu/drm/amd/display/dc/inc/resource.h | 5 + 3 files changed, 40 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/display/dc/core/dc_resource.c +32 -14
@@ -268,24 +268,30 @@ bool resource_construct(return true; } +static int find_matching_clock_source ( +const struct resource_pool *pool, +struct clock_source *clock_source) +{ +int i; + +for (i =0 ; i < pool->clk_src_count; i++) { +if (pool->clock_sources[i] == clock_source) +return i; + } +return -1 ; +}void resource_unreference_clock_source (struct resource_context *res_ctx,const struct resource_pool *pool,struct clock_source *clock_source) { -int i; - -for (i =0 ; i < pool->clk_src_count; i++) { -if (pool->clock_sources[i] != clock_source) -continue ; +int i =find_matching_clock_source (pool, clock_source); +if (i >-1 ) res_ctx->clock_source_ref_count[i]--; -break ; - } -if (pool->dp_clock_source == clock_source) res_ctx->dp_clock_source_ref_count--; }
@@ -295,19 +301,31 @@ void resource_reference_clock_source(const struct resource_pool *pool, struct clock_source *clock_source) { - int i; -for (i =0 ; i < pool->clk_src_count; i++) { -if (pool->clock_sources[i] != clock_source) -continue ; + int i = find_matching_clock_source(pool, clock_source); +if (i >-1 ) res_ctx->clock_source_ref_count[i]++; -break ; - }if (pool->dp_clock_source == clock_source) res_ctx->dp_clock_source_ref_count++; } +int resource_get_clock_source_reference ( +struct resource_context *res_ctx, +const struct resource_pool *pool, +struct clock_source *clock_source) +{ +int i =find_matching_clock_source (pool, clock_source); + +if (i >-1 ) +return res_ctx->clock_source_ref_count[i]; + +if (pool->dp_clock_source == clock_source) +return res_ctx->dp_clock_source_ref_count; + +return -1 ; +} +bool resource_are_streams_timing_synchronizable (struct dc_stream_state *stream1,struct dc_stream_state *stream2)
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +3 -1
@@ -1939,7 +1939,9 @@ static void dce110_reset_hw_ctx_wrap( pipe_ctx_old->plane_res.mi->funcs->free_mem_input ( pipe_ctx_old->plane_res.mi, dc->current_state->stream_count); -if (old_clk) +if (old_clk &&0 ==resource_get_clock_source_reference (&context->res_ctx, + dc->res_pool, + old_clk)) old_clk->funcs->cs_power_down (old_clk); dc->hwss.disable_plane (dc, pipe_ctx_old);
drivers/gpu/drm/amd/display/dc/inc/resource.h +5 -0
@@ -102,6 +102,11 @@ void resource_reference_clock_source(const struct resource_pool *pool, struct clock_source *clock_source); +int resource_get_clock_source_reference ( +struct resource_context *res_ctx, +const struct resource_pool *pool, +struct clock_source *clock_source); +bool resource_are_streams_timing_synchronizable (struct dc_stream_state *stream1,struct dc_stream_state *stream2);
Greg Kroah-Hartman
maintainerPATCH 176/197 drm/amdgpu:add new firmware id for VCN
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Likun Gao <[email protected]>
commit c9ca989696ff28ffb015cc2b7c5577938ef2626c upstream.
Add the new firmware id for VCN into the enum
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h | 1 + 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h +1 -0
@@ -194,6 +194,7 @@ enum AMDGPU_UCODE_ID {AMDGPU_UCODE_ID_SMC ,AMDGPU_UCODE_ID_UVD ,AMDGPU_UCODE_ID_VCE , +AMDGPU_UCODE_ID_VCN , AMDGPU_UCODE_ID_MAXIMUM, };
Greg Kroah-Hartman
maintainerPATCH 150/197 btrfs: reorder initialization before the mount locks uuid_mutex
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Sterba <[email protected]>
[ Upstream commit 399f7f4c42e8a58c8456264d5112287aefe44cf4 ]
In preparation to take a big lock, move resource initialization before the critical section. It's not obvious from the diff, the desired order is:
- initialize mount security options
- allocate temporary fs_info
- allocate superblock buffers
--- fs/btrfs/super.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-)
fs/btrfs/super.c +14 -16
@@ -1528,14 +1528,6 @@ static struct dentry *btrfs_mount_root(sif (!(flags &SB_RDONLY )) mode |=FMODE_WRITE ; -mutex_lock (&uuid_mutex); - error =btrfs_parse_early_options (data, mode, fs_type, - &fs_devices); -mutex_unlock (&uuid_mutex); -if (error) { -return ERR_PTR (error); - } -security_init_mnt_opts (&new_sec_opts);if (data) { error =parse_security_options (data, &new_sec_opts);
@@ -1543,12 +1535,6 @@ static struct dentry *btrfs_mount_root(sreturn ERR_PTR (error); } -mutex_lock (&uuid_mutex); - error =btrfs_scan_one_device (device_name, mode, fs_type, &fs_devices); -mutex_unlock (&uuid_mutex); -if (error) - goto error_sec_opts; -/* * Setup a dummy root and fs_info for test/set super. This is because * we don't actually fill this stuff out until open_ctree, but we need
@@ -1561,8 +1547,6 @@ static struct dentry *btrfs_mount_root(s goto error_sec_opts; } - fs_info->fs_devices = fs_devices; - fs_info->super_copy =kzalloc (BTRFS_SUPER_INFO_SIZE ,GFP_KERNEL ); fs_info->super_for_commit =kzalloc (BTRFS_SUPER_INFO_SIZE ,GFP_KERNEL );security_init_mnt_opts (&fs_info->security_opts);
@@ -1572,6 +1556,20 @@ static struct dentry *btrfs_mount_root(s }mutex_lock (&uuid_mutex); + error =btrfs_parse_early_options (data, mode, fs_type, &fs_devices); +mutex_unlock (&uuid_mutex); +if (error) + goto error_fs_info; + +mutex_lock (&uuid_mutex); + error =btrfs_scan_one_device (device_name, mode, fs_type, &fs_devices); +mutex_unlock (&uuid_mutex); +if (error) + goto error_fs_info; + + fs_info->fs_devices = fs_devices; + +mutex_lock (&uuid_mutex); error =btrfs_open_devices (fs_devices, mode, fs_type);mutex_unlock (&uuid_mutex);if (error)
Greg Kroah-Hartman
maintainerPATCH 178/197 drm/amdgpu:add VCN booting with firmware loaded by PSP
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Likun Gao <[email protected]>
commit 4d77c0f676e910fb1f1870738aa4bd168f253621 upstream.
Setup psp firmware loading for VCN, and make VCN block booting from tmr mac address.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c | 17 ++++++++------ drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 38 +++++++++++++++++++++++++------- 2 files changed, 40 insertions(+), 15 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c +10 -7
@@ -111,9 +111,10 @@ int amdgpu_vcn_sw_init(struct amdgpu_dev version_major, version_minor, family_id); } - bo_size =AMDGPU_GPU_PAGE_ALIGN (le32_to_cpu (hdr->ucode_size_bytes) +8 ) - +AMDGPU_VCN_STACK_SIZE +AMDGPU_VCN_HEAP_SIZE + bo_size =AMDGPU_VCN_STACK_SIZE +AMDGPU_VCN_HEAP_SIZE +AMDGPU_VCN_SESSION_SIZE *40 ; +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) + bo_size +=AMDGPU_GPU_PAGE_ALIGN (le32_to_cpu (hdr->ucode_size_bytes) +8 ); r =amdgpu_bo_create_kernel (adev, bo_size,PAGE_SIZE ,AMDGPU_GEM_DOMAIN_VRAM , &adev->vcn.vcpu_bo, &adev->vcn.gpu_addr, &adev->vcn.cpu_addr);
@@ -187,11 +188,13 @@ int amdgpu_vcn_resume(struct amdgpu_deviunsigned offset; hdr = (const struct common_firmware_header *)adev->vcn.fw->data; - offset =le32_to_cpu (hdr->ucode_array_offset_bytes); -memcpy_toio (adev->vcn.cpu_addr, adev->vcn.fw->data + offset, -le32_to_cpu (hdr->ucode_size_bytes)); - size -=le32_to_cpu (hdr->ucode_size_bytes); - ptr +=le32_to_cpu (hdr->ucode_size_bytes); +if (adev->firmware.load_type !=AMDGPU_FW_LOAD_PSP ) { + offset =le32_to_cpu (hdr->ucode_array_offset_bytes); +memcpy_toio (adev->vcn.cpu_addr, adev->vcn.fw->data + offset, +le32_to_cpu (hdr->ucode_size_bytes)); + size -=le32_to_cpu (hdr->ucode_size_bytes); + ptr +=le32_to_cpu (hdr->ucode_size_bytes); + }memset_io (ptr,0 , size); }
drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c +30 -8
@@ -90,6 +90,16 @@ static int vcn_v1_0_sw_init(void *handleif (r)return r; +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { +const struct common_firmware_header *hdr; + hdr = (const struct common_firmware_header *)adev->vcn.fw->data; + adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].ucode_id =AMDGPU_UCODE_ID_VCN ; + adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].fw = adev->vcn.fw; + adev->firmware.fw_size += +ALIGN (le32_to_cpu (hdr->ucode_size_bytes),PAGE_SIZE ); +DRM_INFO ("PSP loading VCN firmware\n" ); + } + r =amdgpu_vcn_resume (adev);if (r)return r;
@@ -241,26 +251,38 @@ static int vcn_v1_0_resume(void *handle)static void vcn_v1_0_mc_resume (struct amdgpu_device *adev) {uint32_t size =AMDGPU_GPU_PAGE_ALIGN (adev->vcn.fw->size +4 ); +uint32_t offset; -WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW, +if (adev->firmware.load_type ==AMDGPU_FW_LOAD_PSP ) { +WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW, + (adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].tmr_mc_addr_lo)); +WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH, + (adev->firmware.ucode[AMDGPU_UCODE_ID_VCN ].tmr_mc_addr_hi)); +WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0,0 ); + offset =0 ; + }else { +WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_LOW,lower_32_bits (adev->vcn.gpu_addr)); -WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH, +WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE_64BIT_BAR_HIGH,upper_32_bits (adev->vcn.gpu_addr)); -WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0, -AMDGPU_UVD_FIRMWARE_OFFSET >>3 ); + offset = size; +WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET0, +AMDGPU_UVD_FIRMWARE_OFFSET >>3 ); + } +WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_SIZE0, size);WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_LOW, -lower_32_bits (adev->vcn.gpu_addr + size)); +lower_32_bits (adev->vcn.gpu_addr + offset));WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE1_64BIT_BAR_HIGH, -upper_32_bits (adev->vcn.gpu_addr + size)); +upper_32_bits (adev->vcn.gpu_addr + offset));WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET1,0 );WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_SIZE1,AMDGPU_VCN_HEAP_SIZE );WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_LOW, -lower_32_bits (adev->vcn.gpu_addr + size +AMDGPU_VCN_HEAP_SIZE )); +lower_32_bits (adev->vcn.gpu_addr + offset +AMDGPU_VCN_HEAP_SIZE ));WREG32_SOC15 (UVD ,0 , mmUVD_LMI_VCPU_CACHE2_64BIT_BAR_HIGH, -upper_32_bits (adev->vcn.gpu_addr + size +AMDGPU_VCN_HEAP_SIZE )); +upper_32_bits (adev->vcn.gpu_addr + offset +AMDGPU_VCN_HEAP_SIZE ));WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_OFFSET2,0 );WREG32_SOC15 (UVD ,0 , mmUVD_VCPU_CACHE_SIZE2,AMDGPU_VCN_STACK_SIZE + (AMDGPU_VCN_SESSION_SIZE *40 ));
Greg Kroah-Hartman
maintainerPATCH 181/197 drm/i915: Re-apply "Perform link quality check, unconditionally during long pulse"
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jan-Marek Glogowski <[email protected]>
commit 399334708b4f07b107094e5db4a390f0f25d2d4f upstream.
This re-applies the workaround for "some DP sinks, [which] are a little nuts" from commit 1a36147bb939 ("drm/i915: Perform link quality check unconditionally during long pulse").
It makes the secondary AOC E2460P monitor connected via DP to an acer Veriton N4640G usable again.
This hunk was dropped in commit c85d200e8321 ("drm/i915: Move SST DP link retraining into the ->post_hotplug() hook")
--- drivers/gpu/drm/i915/intel_dp.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +19 -14
@@ -4293,18 +4293,6 @@ intel_dp_needs_link_retrain(struct intelreturn !drm_dp_channel_eq_ok (link_status, intel_dp->lane_count); } -/* -* If display is now connected check links status, -* there has been known issues of link loss triggering -* long pulse. -* -* Some sinks (eg. ASUS PB287Q) seem to perform some -* weird HPD ping pong during modesets. So we can apparently -* end up with HPD going low during a modeset, and then -* going back up soon after. And once that happens we must -* retrain the link to get a picture. That's in case no -* userspace component reacted to intermittent HPD dip. -*/ int intel_dp_retrain_link (struct intel_encoder *encoder,struct drm_modeset_acquire_ctx *ctx) {
@@ -4794,7 +4782,8 @@ intel_dp_unset_edid(struct intel_dp *int }static int -intel_dp_long_pulse (struct intel_connector *connector) +intel_dp_long_pulse (struct intel_connector *connector, +struct drm_modeset_acquire_ctx *ctx) {struct drm_i915_private *dev_priv =to_i915 (connector->base.dev);struct intel_dp *intel_dp =intel_attached_dp (&connector->base);
@@ -4853,6 +4842,22 @@ intel_dp_long_pulse(struct intel_connect*/ status = connector_status_disconnected; goto out; + }else { +/* +* If display is now connected check links status, +* there has been known issues of link loss triggering +* long pulse. +* +* Some sinks (eg. ASUS PB287Q) seem to perform some +* weird HPD ping pong during modesets. So we can apparently +* end up with HPD going low during a modeset, and then +* going back up soon after. And once that happens we must +* retrain the link to get a picture. That's in case no +* userspace component reacted to intermittent HPD dip. +*/ +struct intel_encoder *encoder = &dp_to_dig_port (intel_dp)->base; + +intel_dp_retrain_link (encoder, ctx); }/*
@@ -4914,7 +4919,7 @@ intel_dp_detect(struct drm_connector *coreturn ret; } - status =intel_dp_long_pulse (intel_dp->attached_connector); + status =intel_dp_long_pulse (intel_dp->attached_connector, ctx); } intel_dp->detect_done = false;
Greg Kroah-Hartman
maintainerPATCH 182/197 uapi/linux/keyctl.h: dont use C++ reserved keyword as a struct member name
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
commit 8a2336e549d385bb0b46880435b411df8d8200e8 upstream.
Since this header is in "include/uapi/linux/", apparently people want to use it in userspace programs -- even in C++ ones. However, the header uses a C++ reserved keyword ("private"), so change that to "dh_private" instead to allow the header file to be used in C++ userspace.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=191051
--- include/uapi/linux/keyctl.h | 2 +- security/keys/dh.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
include/uapi/linux/keyctl.h +1 -1
@@ -65,7 +65,7 @@/* keyctl structures */ struct keyctl_dh_params { -__s32 private; +__s32 dh_private;__s32 prime;__s32 base; };
security/keys/dh.c +1 -1
@@ -300,7 +300,7 @@ long __keyctl_dh_compute(struct keyctl_d } dh_inputs.g_size = dlen; - dlen =dh_data_from_key (pcopy.private, &dh_inputs.key); + dlen =dh_data_from_key (pcopy.dh_private, &dh_inputs.key);if (dlen <0 ) { ret = dlen; goto out2;
Greg Kroah-Hartman
maintainerPATCH 151/197 btrfs: fix mount and ioctl device scan ioctl race
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Sterba <[email protected]>
[ Upstream commit 81ffd56b5745355b70d54ca4e1bdd0d64a66ff9f ]
Technically this extends the critical section covered by uuid_mutex to:
- parse early mount options -- here we can call device scan on paths that can be passed as 'device=/dev/...'
- scan the device passed to mount
- open the devices related to the fs_devices -- this increases fs_devices::opened
The race can happen when mount calls one of the scans and there's another one called eg. by mkfs or 'btrfs dev scan':
Mount Scan
----- ----scan_one_device (dev1, fsid1)
scan_one_device (dev2, fsid1)
add the device
free stale devices
fsid1 fs_devices::opened == 0
find fsid1:dev1 free fsid1:dev1 if it's the last one,
free fs_devices of fsid1 too
open_devices (dev1, fsid1)
dev1 not found
When fixed, the uuid mutex will make sure that mount will increase fs_devices::opened and this will not be touched by the racing scan ioctl.
--- fs/btrfs/super.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
fs/btrfs/super.c +6 -6
@@ -1557,19 +1557,19 @@ static struct dentry *btrfs_mount_root(smutex_lock (&uuid_mutex); error =btrfs_parse_early_options (data, mode, fs_type, &fs_devices); -mutex_unlock (&uuid_mutex); -if (error) +if (error) { +mutex_unlock (&uuid_mutex); goto error_fs_info; + } -mutex_lock (&uuid_mutex); error =btrfs_scan_one_device (device_name, mode, fs_type, &fs_devices); -mutex_unlock (&uuid_mutex); -if (error) +if (error) { +mutex_unlock (&uuid_mutex); goto error_fs_info; + } fs_info->fs_devices = fs_devices; -mutex_lock (&uuid_mutex); error =btrfs_open_devices (fs_devices, mode, fs_type);mutex_unlock (&uuid_mutex);if (error)
Greg Kroah-Hartman
maintainerPATCH 152/197 drm/i915/lpe: Mark LPE audio runtime pm as "no callbacks"
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chris Wilson <[email protected]>
commit 75eef0f1ed478284911b8723a5bdb659499a7aac upstream.
The LPE audio is a child device of i915, it is powered up and down alongside the igfx and presents no independent runtime interface. This aptly fulfils the description of a "No-Callback" Device, so mark it thus.
Testcase: igt/pm_rpm/basic-pci-d3-state
Testcase: igt/pm_rpm/basic-rte
--- drivers/gpu/drm/i915/intel_lpe_audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_lpe_audio.c +1 -3
@@ -127,9 +127,7 @@ lpe_audio_platdev_create(struct drm_i915return platdev; } -pm_runtime_forbid (&platdev->dev); -pm_runtime_set_active (&platdev->dev); -pm_runtime_enable (&platdev->dev); +pm_runtime_no_callbacks (&platdev->dev);return platdev; }
Greg Kroah-Hartman
maintainerPATCH 153/197 drm/i915: Nuke the LVDS lid notifier
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ville Syrjälä <[email protected]>
commit 05c72e77ccda89ff624108b1b59a0fc43843f343 upstream.
We broke the LVDS notifier resume thing in (presumably) commit e2c8b8701e2d ("drm/i915: Use atomic helpers for suspend, v2.") as we no longer duplicate the current state in the LVDS notifier and thus we never resume it properly either.
Instead of trying to fix it again let's just kill off the lid notifier entirely. None of the machines tested thus far have apparently needed it. Originally the lid notifier was added to work around cases where the VBIOS was clobbering some of the hardware state behind the driver's back, mostly on Thinkpads. We now have a few report of Thinkpads working just fine without the notifier. So maybe it was misdiagnosed originally, or something else has changed (ACPI video stuff perhaps?).
If we do end up finding a machine where the VBIOS is still causing problems I would suggest that we first try setting various bits in the VBIOS scratch registers. There are several to choose from that may instruct the VBIOS to steer clear.
With the notifier gone we'll also stop looking at the panel status in ->detect().
v2: Nuke enum modeset_restore (Rodrigo)
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105902
References: https://lists.freedesktop.org/archives/intel-gfx/2018-June/169315.html
References: https://bugs.freedesktop.org/show_bug.cgi?id=21230
--- drivers/gpu/drm/i915/i915_drv.c | 10 -- drivers/gpu/drm/i915/i915_drv.h | 8 -- drivers/gpu/drm/i915/intel_lvds.c | 136 -------------------------------------- 3 files changed, 2 insertions(+), 152 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +0 -10
@@ -919,7 +919,6 @@ static int i915_driver_init_early(structspin_lock_init (&dev_priv->uncore.lock);mutex_init (&dev_priv->sb_lock); -mutex_init (&dev_priv->modeset_restore_lock);mutex_init (&dev_priv->av_mutex);mutex_init (&dev_priv->wm.wm_mutex);mutex_init (&dev_priv->pps_mutex);
@@ -1560,11 +1559,6 @@ static int i915_drm_suspend(struct drm_dpci_power_t opregion_target_state;int error; -/* ignore lid events during suspend */ -mutex_lock (&dev_priv->modeset_restore_lock); - dev_priv->modeset_restore =MODESET_SUSPENDED ; -mutex_unlock (&dev_priv->modeset_restore_lock); -disable_rpm_wakeref_asserts (dev_priv);/* We do a lot of poking in a lot of registers, make sure they work
@@ -1764,10 +1758,6 @@ static int i915_drm_resume(struct drm_deintel_fbdev_set_suspend (dev,FBINFO_STATE_RUNNING , false); -mutex_lock (&dev_priv->modeset_restore_lock); - dev_priv->modeset_restore =MODESET_DONE ; -mutex_unlock (&dev_priv->modeset_restore_lock); -intel_opregion_notify_adapter (dev_priv,PCI_D0 );enable_rpm_wakeref_asserts (dev_priv);
drivers/gpu/drm/i915/i915_drv.h +0 -8
@@ -1003,12 +1003,6 @@ struct i915_gem_mm {#define I915_ENGINE_DEAD_TIMEOUT (4 * HZ)/* Seqno, head and subunits dead */ #define I915_SEQNO_DEAD_TIMEOUT (12 * HZ)/* Seqno dead with active head */ -enum modeset_restore { -MODESET_ON_LID_OPEN , -MODESET_DONE , -MODESET_SUSPENDED , -}; -#define DP_AUX_A 0x40#define DP_AUX_B 0x10#define DP_AUX_C 0x20
@@ -1740,8 +1734,6 @@ struct drm_i915_private {unsigned long quirks; -enum modeset_restore modeset_restore; -struct mutex modeset_restore_lock;struct drm_atomic_state *modeset_restore_state;struct drm_modeset_acquire_ctx reset_ctx;
drivers/gpu/drm/i915/intel_lvds.c +2 -134
169 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 154/197 drm/i915: Increase LSPCON timeout
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Fredrik Schön <[email protected]>
commit 299c2a904b1e8d5096d4813df6371357d97a6cd1 upstream.
100 ms is not enough time for the LSPCON adapter on Intel NUC devices to settle. This causes dropped display modes at boot or screen reconfiguration. Empirical testing can reproduce the error up to a timeout of 190 ms. Basic boot and stress testing at 200 ms has not (yet) failed.
Increase timeout to 400 ms to get some margin of error.
Changes from v1:
The initial suggestion of 1000 ms was lowered due to concerns about delaying valid timeout cases.
Update patch metadata.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107503
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1570392
--- drivers/gpu/drm/i915/intel_lspcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/intel_lspcon.c +1 -1
@@ -74,7 +74,7 @@ static enum drm_lspcon_mode lspcon_wait_DRM_DEBUG_KMS ("Waiting for LSPCON mode %s to settle\n" ,lspcon_mode_name (mode)); -wait_for ((current_mode =lspcon_get_current_mode (lspcon)) == mode,100 ); +wait_for ((current_mode =lspcon_get_current_mode (lspcon)) == mode,400 );if (current_mode != mode)DRM_ERROR ("LSPCON mode hasn't settled\n" );
Greg Kroah-Hartman
maintainerPATCH 155/197 drm/i915: Free write_buf that we allocated with kzalloc.
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rodrigo Vivi <[email protected]>
commit 1b1b1162745e5f9e5c6c095afc8081df3edabc50 upstream.
We use kzalloc to allocate the write_buf that we use for i2c transfer on hdcp write. But it seems that we are forgetting to free the memory that is not needed after i2c transfer is completed.
--- drivers/gpu/drm/i915/intel_hdmi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/intel_hdmi.c +6 -2
@@ -933,8 +933,12 @@ static int intel_hdmi_hdcp_write(struct ret =i2c_transfer (adapter, &msg,1 );if (ret ==1 ) -return 0 ; -return ret >=0 ? -EIO : ret; + ret =0 ; +else if (ret >=0 ) + ret = -EIO ; + +kfree (write_buf); +return ret; } static
Greg Kroah-Hartman
maintainerPATCH 147/197 btrfs: use device_list_mutex when removing stale devices
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Anand Jain <[email protected]>
[ Upstream commit 7bcb8164ad9435068d9bc3b83b8a002c64d63ff6 ]
btrfs_free_stale_devices() finds a stale (not opened) device matching path in the fs_uuid list. We are already under uuid_mutex so when we check for each fs_devices, hold the device_list_mutex too.
--- fs/btrfs/volumes.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-)
fs/btrfs/volumes.c +15 -10
@@ -640,8 +640,11 @@ static void btrfs_free_stale_devices(construct btrfs_device *device, *tmp_device;list_for_each_entry_safe (fs_devices, tmp_fs_devices, &fs_uuids, fs_list) { -if (fs_devices->opened) +mutex_lock (&fs_devices->device_list_mutex); +if (fs_devices->opened) { +mutex_unlock (&fs_devices->device_list_mutex);continue ; + }list_for_each_entry_safe (device, tmp_device, &fs_devices->devices, dev_list) {
@@ -661,16 +664,18 @@ static void btrfs_free_stale_devices(concontinue ;/* delete the stale device */ -if (fs_devices->num_devices ==1 ) { -btrfs_sysfs_remove_fsid (fs_devices); -list_del (&fs_devices->fs_list); -free_fs_devices (fs_devices); + fs_devices->num_devices--; +list_del (&device->dev_list); +btrfs_free_device (device); + +if (fs_devices->num_devices ==0 )break ; - }else { - fs_devices->num_devices--; -list_del (&device->dev_list); -btrfs_free_device (device); - } + } +mutex_unlock (&fs_devices->device_list_mutex); +if (fs_devices->num_devices ==0 ) { +btrfs_sysfs_remove_fsid (fs_devices); +list_del (&fs_devices->fs_list); +free_fs_devices (fs_devices); } } }
Greg Kroah-Hartman
maintainerPATCH 185/197 x86/tsc: Prevent result truncation on 32bit
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chuanhua Lei <[email protected]>
commit 17f6bac2249356c795339e03a0742cd79be3cab8 upstream.
Loops per jiffy is calculated by multiplying tsc_khz with 1e3 and then dividing it by HZ.
Both tsc_khz and the temporary variable holding the multiplication result are of type unsigned long, so on 32bit the result is truncated to the lower 32bit.
Use u64 as type for the temporary variable and cast tsc_khz to it before multiplying.
[ tglx: Massaged changelog and removed pointless braces ]
[ tglx: Backport to stable. Due to massive code changes is the upstream
commit not applicable anymore. The issue has gone unnoticed in kernels pre 4.19 because the bogus LPJ value gets fixed up in a later stage of early boot, but it still might cause subtle and hard to debug issues between these two points. ]
--- arch/x86/kernel/tsc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/tsc.c +2 -2
@@ -1343,7 +1343,7 @@ device_initcall(init_tsc_clocksource);void __init tsc_early_delay_calibrate (void ) { -unsigned long lpj; +u64 lpj;if (!boot_cpu_has (X86_FEATURE_TSC ))return ;
@@ -1355,7 +1355,7 @@ void __init tsc_early_delay_calibrate(voif (!tsc_khz)return ; - lpj = tsc_khz *1000 ; + lpj = (u64 )tsc_khz *1000 ;do_div (lpj,HZ ); loops_per_jiffy = lpj; }
Greg Kroah-Hartman
maintainerPATCH 195/197 x86: kvm: avoid unused variable warning
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnd Bergmann <[email protected]>
commit 7288bde1f9df6c1475675419bdd7725ce84dec56 upstream.
Removing one of the two accesses of the maxphyaddr variable led to a harmless warning:
arch/x86/kvm/x86.c: In function 'kvm_set_mmio_spte_mask':arch/x86/kvm/x86.c:6563:6: error: unused variable 'maxphyaddr' [-Werror=unused-variable]
Removing the #ifdef seems to be the nicest workaround, as it makes the code look cleaner than adding another #ifdef.
--- arch/x86/kvm/x86.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/x86/kvm/x86.c +1 -3
@@ -6516,14 +6516,12 @@ static void kvm_set_mmio_spte_mask(void)/* Set the present bit. */ mask |=1ull ; -#ifdef CONFIG_X86_64 /* * If reserved bit is not supported, clear the present bit to disable * mmio page fault. */ -if (maxphyaddr ==52 ) +if (IS_ENABLED (CONFIG_X86_64 ) && maxphyaddr ==52 ) mask &= ~1ull ; -#endif kvm_mmu_set_mmio_spte_mask (mask, mask); }
Greg Kroah-Hartman
maintainerPATCH 196/197 HID: redragon: fix num lock and caps lock LEDs
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Robert Munteanu <[email protected]>
commit dc9b8e85ed95cbe7e3ad0eabb5b48d617bbc365e upstream.
The redragon asura keyboard registers two input devices. The initial commit 85455dd906d5 ("HID: redragon: Fix modifier keys for Redragon Asura Keyboard") considered this an error and prevented one of the devices from registering. However, once this is done the num lock and caps lock leds no longer toggle on and off, although the key functionality is not affected.
This commit removes the code that prevents the input device registration and restores the num lock and caps lock LEDs.
--- drivers/hid/hid-redragon.c | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-)
drivers/hid/hid-redragon.c +1 -25
@@ -44,29 +44,6 @@ static __u8 *redragon_report_fixup(strucreturn rdesc; } -static int redragon_probe (struct hid_device *dev, -const struct hid_device_id *id) -{ -int ret; - - ret =hid_parse (dev); -if (ret) { -hid_err (dev,"parse failed\n" ); -return ret; - } - -/* do not register unused input device */ -if (dev->maxapplication ==1 ) -return 0 ; - - ret =hid_hw_start (dev,HID_CONNECT_DEFAULT ); -if (ret) { -hid_err (dev,"hw start failed\n" ); -return ret; - } - -return 0 ; -}static const struct hid_device_id redragon_devices[] = { {HID_USB_DEVICE (USB_VENDOR_ID_JESS ,USB_DEVICE_ID_REDRAGON_ASURA )}, {}
@@ -77,8 +54,7 @@ MODULE_DEVICE_TABLE(hid, redragon_devicestatic struct hid_driver redragon_driver = { .name ="redragon" , .id_table = redragon_devices, - .report_fixup = redragon_report_fixup, - .probe = redragon_probe + .report_fixup = redragon_report_fixup };module_hid_driver (redragon_driver);
Greg Kroah-Hartman
maintainerPATCH 197/197 ASoC: wm8994: Fix missing break in switch
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gustavo A. R. Silva <[email protected]>
commit ad0eaee6195db1db1749dd46b9e6f4466793d178 upstream.
Add missing break statement in order to prevent the code from falling through to the default case.
Addresses-Coverity-ID: 115050 ("Missing break in switch")
--- sound/soc/codecs/wm8994.c | 1 + 1 file changed, 1 insertion(+)
sound/soc/codecs/wm8994.c +1 -0
@@ -2432,6 +2432,7 @@ static int wm8994_set_dai_sysclk(structsnd_soc_component_update_bits (component,WM8994_POWER_MANAGEMENT_2 ,WM8994_OPCLK_ENA ,0 ); } +break ;default :return -EINVAL ;
Greg Kroah-Hartman
maintainerPATCH 186/197 drm/amdgpu: Keep track of amount of pinned CPU visible VRAM
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michel Dänzer <[email protected]>
commit ddc21af4d0f37f42b33c54cb69b215997fe5b082 upstream.
Instead of CPU invisible VRAM. Preparation for the following, no functional change intended.
v2:
* Also change amdgpu_vram_mgr_bo_invisible_size to amdgpu_vram_mgr_bo_visible_size, allowing further simplification (Christian König)
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 ++--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 20 ++++++++------------ 5 files changed, 14 insertions(+), 19 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
@@ -1580,7 +1580,7 @@ struct amdgpu_device {/* tracking pinned memory */ u64 vram_pin_size; -u64 invisible_pin_size; +u64 visible_pin_size;u64 gart_pin_size;/* amdkfd interface */
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -3
@@ -497,7 +497,7 @@ static int amdgpu_info_ioctl(struct drm_ vram_gtt.vram_size = adev->gmc.real_vram_size; vram_gtt.vram_size -= adev->vram_pin_size; vram_gtt.vram_cpu_accessible_size = adev->gmc.visible_vram_size; - vram_gtt.vram_cpu_accessible_size -= (adev->vram_pin_size - adev->invisible_pin_size); + vram_gtt.vram_cpu_accessible_size -= adev->visible_pin_size; vram_gtt.gtt_size = adev->mman.bdev.man[TTM_PL_TT ].size; vram_gtt.gtt_size *=PAGE_SIZE ; vram_gtt.gtt_size -= adev->gart_pin_size;
@@ -518,8 +518,7 @@ static int amdgpu_info_ioctl(struct drm_ mem.cpu_accessible_vram.total_heap_size = adev->gmc.visible_vram_size; mem.cpu_accessible_vram.usable_heap_size = - adev->gmc.visible_vram_size - - (adev->vram_pin_size - adev->invisible_pin_size); + adev->gmc.visible_vram_size - adev->visible_pin_size; mem.cpu_accessible_vram.heap_usage =amdgpu_vram_mgr_vis_usage (&adev->mman.bdev.man[TTM_PL_VRAM ]); mem.cpu_accessible_vram.max_allocation =
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +2 -2
@@ -762,7 +762,7 @@ int amdgpu_bo_pin_restricted(struct amdg domain =amdgpu_mem_type_to_domain (bo->tbo.mem.mem_type);if (domain ==AMDGPU_GEM_DOMAIN_VRAM ) { adev->vram_pin_size +=amdgpu_bo_size (bo); - adev->invisible_pin_size +=amdgpu_vram_mgr_bo_invisible_size (bo); + adev->visible_pin_size +=amdgpu_vram_mgr_bo_visible_size (bo); }else if (domain ==AMDGPU_GEM_DOMAIN_GTT ) { adev->gart_pin_size +=amdgpu_bo_size (bo); }
@@ -792,7 +792,7 @@ int amdgpu_bo_unpin(struct amdgpu_bo *boif (bo->tbo.mem.mem_type ==TTM_PL_VRAM ) { adev->vram_pin_size -=amdgpu_bo_size (bo); - adev->invisible_pin_size -=amdgpu_vram_mgr_bo_invisible_size (bo); + adev->visible_pin_size -=amdgpu_vram_mgr_bo_visible_size (bo); }else if (bo->tbo.mem.mem_type ==TTM_PL_TT ) { adev->gart_pin_size -=amdgpu_bo_size (bo); }
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h +1 -1
@@ -73,7 +73,7 @@ bool amdgpu_gtt_mgr_has_gart_addr(structuint64_t amdgpu_gtt_mgr_usage (struct ttm_mem_type_manager *man);int amdgpu_gtt_mgr_recover (struct ttm_mem_type_manager *man); -u64 amdgpu_vram_mgr_bo_invisible_size (struct amdgpu_bo *bo); +u64 amdgpu_vram_mgr_bo_visible_size (struct amdgpu_bo *bo);uint64_t amdgpu_vram_mgr_usage (struct ttm_mem_type_manager *man);uint64_t amdgpu_vram_mgr_vis_usage (struct ttm_mem_type_manager *man);
drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +8 -12
@@ -97,33 +97,29 @@ static u64 amdgpu_vram_mgr_vis_size(stru }/** -* amdgpu_vram_mgr_bo_invisible_size - CPU invisible BO size +* amdgpu_vram_mgr_bo_visible_size - CPU visible BO size * * @bo: &amdgpu_bo buffer object (must be in VRAM) * * Returns: -* How much of the given &amdgpu_bo buffer object lies in CPU invisible VRAM. +* How much of the given &amdgpu_bo buffer object lies in CPU visible VRAM. */ -u64 amdgpu_vram_mgr_bo_invisible_size (struct amdgpu_bo *bo) +u64 amdgpu_vram_mgr_bo_visible_size (struct amdgpu_bo *bo) {struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev);struct ttm_mem_reg *mem = &bo->tbo.mem;struct drm_mm_node *nodes = mem->mm_node;unsigned pages = mem->num_pages; -u64 usage =0 ; +u64 usage;if (adev->gmc.visible_vram_size == adev->gmc.real_vram_size) -return 0 ; +return amdgpu_bo_size (bo);if (mem->start >= adev->gmc.visible_vram_size >>PAGE_SHIFT ) -return amdgpu_bo_size (bo); +return 0 ; -while (nodes && pages) { - usage += nodes->size <<PAGE_SHIFT ; - usage -=amdgpu_vram_mgr_vis_size (adev, nodes); - pages -= nodes->size; - ++nodes; - } +for (usage =0 ; nodes && pages; pages -= nodes->size, nodes++) + usage +=amdgpu_vram_mgr_vis_size (adev, nodes);return usage; }
Greg Kroah-Hartman
maintainerPATCH 187/197 drm/amdgpu: Make pin_size values atomic
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michel Dänzer <[email protected]>
commit a5ccfe5c20740f2fbf00291490cdf8d2373ec255 upstream.
Concurrent execution of the non-atomic arithmetic could result in completely bogus values.
v2:
* Rebased on v2 of the previous patch
Cc: [email protected]
Bugzilla: https://bugs.freedesktop.org/106872
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 6 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 22 +++++++++++----------- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 ++++++++------ 4 files changed, 23 insertions(+), 21 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +3 -3
@@ -1579,9 +1579,9 @@ struct amdgpu_device {DECLARE_HASHTABLE (mn_hash,7 );/* tracking pinned memory */ -u64 vram_pin_size; -u64 visible_pin_size; -u64 gart_pin_size; +atomic64_t vram_pin_size; +atomic64_t visible_pin_size; +atomic64_t gart_pin_size;/* amdkfd interface */ struct kfd_dev *kfd;
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
@@ -257,7 +257,7 @@ static void amdgpu_cs_get_threshold_for_return ; } - total_vram = adev->gmc.real_vram_size - adev->vram_pin_size; + total_vram = adev->gmc.real_vram_size -atomic64_read (&adev->vram_pin_size); used_vram =amdgpu_vram_mgr_usage (&adev->mman.bdev.man[TTM_PL_VRAM ]); free_vram = used_vram >= total_vram ?0 : total_vram - used_vram;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +11 -11
@@ -494,13 +494,13 @@ static int amdgpu_info_ioctl(struct drm_case AMDGPU_INFO_VRAM_GTT : {struct drm_amdgpu_info_vram_gtt vram_gtt; - vram_gtt.vram_size = adev->gmc.real_vram_size; - vram_gtt.vram_size -= adev->vram_pin_size; - vram_gtt.vram_cpu_accessible_size = adev->gmc.visible_vram_size; - vram_gtt.vram_cpu_accessible_size -= adev->visible_pin_size; + vram_gtt.vram_size = adev->gmc.real_vram_size - +atomic64_read (&adev->vram_pin_size); + vram_gtt.vram_cpu_accessible_size = adev->gmc.visible_vram_size - +atomic64_read (&adev->visible_pin_size); vram_gtt.gtt_size = adev->mman.bdev.man[TTM_PL_TT ].size; vram_gtt.gtt_size *=PAGE_SIZE ; - vram_gtt.gtt_size -= adev->gart_pin_size; + vram_gtt.gtt_size -=atomic64_read (&adev->gart_pin_size);return copy_to_user (out, &vram_gtt,min ((size_t )size,sizeof (vram_gtt))) ? -EFAULT :0 ; }
@@ -509,16 +509,16 @@ static int amdgpu_info_ioctl(struct drm_memset (&mem,0 ,sizeof (mem)); mem.vram.total_heap_size = adev->gmc.real_vram_size; - mem.vram.usable_heap_size = - adev->gmc.real_vram_size - adev->vram_pin_size; + mem.vram.usable_heap_size = adev->gmc.real_vram_size - +atomic64_read (&adev->vram_pin_size); mem.vram.heap_usage =amdgpu_vram_mgr_usage (&adev->mman.bdev.man[TTM_PL_VRAM ]); mem.vram.max_allocation = mem.vram.usable_heap_size *3 /4 ; mem.cpu_accessible_vram.total_heap_size = adev->gmc.visible_vram_size; - mem.cpu_accessible_vram.usable_heap_size = - adev->gmc.visible_vram_size - adev->visible_pin_size; + mem.cpu_accessible_vram.usable_heap_size = adev->gmc.visible_vram_size - +atomic64_read (&adev->visible_pin_size); mem.cpu_accessible_vram.heap_usage =amdgpu_vram_mgr_vis_usage (&adev->mman.bdev.man[TTM_PL_VRAM ]); mem.cpu_accessible_vram.max_allocation =
@@ -526,8 +526,8 @@ static int amdgpu_info_ioctl(struct drm_ mem.gtt.total_heap_size = adev->mman.bdev.man[TTM_PL_TT ].size; mem.gtt.total_heap_size *=PAGE_SIZE ; - mem.gtt.usable_heap_size = mem.gtt.total_heap_size - - adev->gart_pin_size; + mem.gtt.usable_heap_size = mem.gtt.total_heap_size - +atomic64_read (&adev->gart_pin_size); mem.gtt.heap_usage =amdgpu_gtt_mgr_usage (&adev->mman.bdev.man[TTM_PL_TT ]); mem.gtt.max_allocation = mem.gtt.usable_heap_size *3 /4 ;
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +8 -6
@@ -761,10 +761,11 @@ int amdgpu_bo_pin_restricted(struct amdg domain =amdgpu_mem_type_to_domain (bo->tbo.mem.mem_type);if (domain ==AMDGPU_GEM_DOMAIN_VRAM ) { - adev->vram_pin_size +=amdgpu_bo_size (bo); - adev->visible_pin_size +=amdgpu_vram_mgr_bo_visible_size (bo); +atomic64_add (amdgpu_bo_size (bo), &adev->vram_pin_size); +atomic64_add (amdgpu_vram_mgr_bo_visible_size (bo), + &adev->visible_pin_size); }else if (domain ==AMDGPU_GEM_DOMAIN_GTT ) { - adev->gart_pin_size +=amdgpu_bo_size (bo); +atomic64_add (amdgpu_bo_size (bo), &adev->gart_pin_size); } error:
@@ -791,10 +792,11 @@ int amdgpu_bo_unpin(struct amdgpu_bo *boreturn 0 ;if (bo->tbo.mem.mem_type ==TTM_PL_VRAM ) { - adev->vram_pin_size -=amdgpu_bo_size (bo); - adev->visible_pin_size -=amdgpu_vram_mgr_bo_visible_size (bo); +atomic64_sub (amdgpu_bo_size (bo), &adev->vram_pin_size); +atomic64_sub (amdgpu_vram_mgr_bo_visible_size (bo), + &adev->visible_pin_size); }else if (bo->tbo.mem.mem_type ==TTM_PL_TT ) { - adev->gart_pin_size -=amdgpu_bo_size (bo); +atomic64_sub (amdgpu_bo_size (bo), &adev->gart_pin_size); }for (i =0 ; i < bo->placement.num_placement; i++) {
Greg Kroah-Hartman
maintainerPATCH 188/197 drm/amdgpu: Warn and update pin_size values when destroying a pinned BO
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michel Dänzer <[email protected]>
commit 15e6b76880e65be24250e30986084b5569b7a06f upstream.
This shouldn't happen, but if it does, we'll get a backtrace of the caller, and update the pin_size values as needed.
v2:
* Check bo->pin_count instead of placement flags (Christian König)
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 32 ++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +25 -7
@@ -50,11 +50,35 @@ static bool amdgpu_need_backup(struct amreturn true; } +/** +* amdgpu_bo_subtract_pin_size - Remove BO from pin_size accounting +* +* @bo: &amdgpu_bo buffer object +* +* This function is called when a BO stops being pinned, and updates the +* &amdgpu_device pin_size values accordingly. +*/ +static void amdgpu_bo_subtract_pin_size (struct amdgpu_bo *bo) +{ +struct amdgpu_device *adev =amdgpu_ttm_adev (bo->tbo.bdev); + +if (bo->tbo.mem.mem_type ==TTM_PL_VRAM ) { +atomic64_sub (amdgpu_bo_size (bo), &adev->vram_pin_size); +atomic64_sub (amdgpu_vram_mgr_bo_visible_size (bo), + &adev->visible_pin_size); + }else if (bo->tbo.mem.mem_type ==TTM_PL_TT ) { +atomic64_sub (amdgpu_bo_size (bo), &adev->gart_pin_size); + } +} +static void amdgpu_ttm_bo_destroy (struct ttm_buffer_object *tbo) {struct amdgpu_device *adev =amdgpu_ttm_adev (tbo->bdev);struct amdgpu_bo *bo =ttm_to_amdgpu_bo (tbo); +if (WARN_ON_ONCE (bo->pin_count >0 )) +amdgpu_bo_subtract_pin_size (bo); +if (bo->kfd_bo)amdgpu_amdkfd_unreserve_system_memory_limit (bo);
@@ -791,13 +815,7 @@ int amdgpu_bo_unpin(struct amdgpu_bo *boif (bo->pin_count)return 0 ; -if (bo->tbo.mem.mem_type ==TTM_PL_VRAM ) { -atomic64_sub (amdgpu_bo_size (bo), &adev->vram_pin_size); -atomic64_sub (amdgpu_vram_mgr_bo_visible_size (bo), - &adev->visible_pin_size); - }else if (bo->tbo.mem.mem_type ==TTM_PL_TT ) { -atomic64_sub (amdgpu_bo_size (bo), &adev->gart_pin_size); - } +amdgpu_bo_subtract_pin_size (bo);for (i =0 ; i < bo->placement.num_placement; i++) { bo->placements[i].lpfn =0 ;
Greg Kroah-Hartman
maintainerPATCH 189/197 drm/amdgpu: Dont warn on destroying a pinned BO
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Michel Dänzer <[email protected]>
commit 456607d816d89a442a3d5ec98b02c8bc950b5228 upstream.
The warning turned out to be not so useful, as BO destruction tends to be deferred to a workqueue.
Also, we should be preventing any damage from this now, so not really important anymore to fix code doing this.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +1 -1
@@ -76,7 +76,7 @@ static void amdgpu_ttm_bo_destroy(structstruct amdgpu_device *adev =amdgpu_ttm_adev (tbo->bdev);struct amdgpu_bo *bo =ttm_to_amdgpu_bo (tbo); -if (WARN_ON_ONCE (bo->pin_count >0 )) +if (bo->pin_count >0 )amdgpu_bo_subtract_pin_size (bo);if (bo->kfd_bo)
Greg Kroah-Hartman
maintainerPATCH 193/197 kbuild: make missing $DEPMOD a Warning instead of an Error
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Randy Dunlap <[email protected]>
commit 914b087ff9e0e9a399a4927fa30793064afc0178 upstream.
When $DEPMOD is not found, only print a warning instead of exiting with an error message and error status:
Warning: 'make modules_install' requires /sbin/depmod. Please install it. This is probably in the kmod package.
Change the Error to a Warning because "not all build hosts for cross compiling Linux are Linux systems and are able to provide a working port of depmod, especially at the file patch /sbin/depmod."
I.e., "make modules_install" may be used to copy/install the loadable modules files to a target directory on a build system and then transferred to an embedded device where /sbin/depmod is run instead of it being run on the build system.
--- scripts/depmod.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
scripts/depmod.sh +2 -2
@@ -15,9 +15,9 @@ if ! test -r System.map ; then fi if [ -z $(command -v $DEPMOD) ]; then - echo "'make modules_install' requires $DEPMOD. Please install it." >&2 + echo "Warning: 'make modules_install' requires $DEPMOD. Please install it." >&2 echo "This is probably in the kmod package." >&2 - exit 1 + exit 0 fi # older versions of depmod require the version string to start with three
Greg Kroah-Hartman
maintainerPATCH 18/197 hv_netvsc: Fix a deadlock by getting rtnl lock earlier in netvsc_probe()
In reply to Greg Kroah-Hartman4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dexuan Cui <[email protected]>
[ Upstream commit e04e7a7bbd4bbabef4e1a58367e5fc9b2edc3b10 ]
This patch fixes the race between netvsc_probe() and rndis_set_subchannel(), which can cause a deadlock.
These are the related 3 paths which show the deadlock:
path #1:
Workqueue: hv_vmbus_con vmbus_onmessage_work [hv_vmbus]
Call Trace:
schedule
schedule_preempt_disabled
__mutex_lock
__device_attach
bus_probe_device
device_add
vmbus_device_register
vmbus_onoffer
vmbus_onmessage_work
process_one_work
worker_thread
kthread
ret_from_forkpath #2:
schedule
schedule_preempt_disabled
__mutex_lock
netvsc_probe
vmbus_probe
really_probe
__driver_attach
bus_for_each_dev
driver_attach_async
async_run_entry_fn
process_one_work
worker_thread
kthread
ret_from_fork
path #3:
Workqueue: events netvsc_subchan_work [hv_netvsc]
Call Trace:
schedule
rndis_set_subchannel
netvsc_subchan_work
process_one_work
worker_thread
kthread
ret_from_forkBefore path #1 finishes, path #2 can start to run, because just before the "bus_probe_device(dev);" in device_add() in path #1, there is a line "object_uevent(&dev->kobj, KOBJ_ADD);", so systemd-udevd can immediately try to load hv_netvsc and hence path #2 can start to run.
Next, path #2 offloads the subchannal's initialization to a workqueue, i.e. path #3, so we can end up in a deadlock situation like this:
Path #2 gets the device lock, and is trying to get the rtnl lock; Path #3 gets the rtnl lock and is waiting for all the subchannel messages to be processed;
Path #1 is trying to get the device lock, but since #2 is not releasing the device lock, path #1 has to sleep; since the VMBus messages are processed one by one, this means the sub-channel messages can't be procedded, so #3 has to sleep with the rtnl lock held, and finally #2 has to sleep... Now all the 3 paths are sleeping and we hit the deadlock.
With the patch, we can make sure #2 gets both the device lock and the rtnl lock together, gets its job done, and releases the locks, so #1 and #3 will not be blocked for ever.
--- drivers/net/hyperv/netvsc_drv.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
drivers/net/hyperv/netvsc_drv.c +10 -1
@@ -2101,6 +2101,16 @@ static int netvsc_probe(struct hv_devicememcpy (net->dev_addr, device_info.mac_adr,ETH_ALEN ); +/* We must get rtnl lock before scheduling nvdev->subchan_work, +* otherwise netvsc_subchan_work() can get rtnl lock first and wait +* all subchannels to show up, but that may not happen because +* netvsc_probe() can't get rtnl lock and as a result vmbus_onoffer() +* -> ... -> device_add() -> ... -> __device_attach() can't get +* the device lock, so all the subchannels can't be processed -- +* finally netvsc_subchan_work() hangs for ever. +*/ +rtnl_lock (); +if (nvdev->num_chn >1 )schedule_work (&nvdev->subchan_work);
@@ -2119,7 +2129,6 @@ static int netvsc_probe(struct hv_deviceelse net->max_mtu =ETH_DATA_LEN ; -rtnl_lock (); ret =register_netdevice (net);if (ret !=0 ) {pr_err ("Unable to register netdev.\n" );
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.8 release. There are 197 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Sep 15 13:17:57 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64 and i386.
Summary
------------------------------------------------------------------------
kernel: 4.18.8-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.18.y
git commit: ae285c20144a3ff94c31498fe34ca1decb2f0b4c
git describe: v4.18.7-198-gae285c20144a
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.18-oe/build/v4.18.7-198-gae285c20144a
No regressions (compared to build v4.18.7)
Ran 20231 total tests in the following environments and test suites.
Environments
--------------
- dragonboard-410c - arm64
- hi6220-hikey - arm64
- i386
- juno-r2 - arm64
- qemu_arm
- qemu_arm64
- qemu_i386
- qemu_x86_64
- x15 - arm
- x86_64
Test Suites
-----------
* boot
* kselftest
* libhugetlbfs
* ltp-cap_bounds-tests
* ltp-containers-tests
* ltp-cve-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-hugetlb-tests
* ltp-io-tests
* ltp-ipc-tests
* ltp-math-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-sched-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* ltp-timers-tests
* ltp-open-posix-tests
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Greg Kroah-Hartman
maintainerQuoted 16 lines · Naresh Kamboju
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.8 release. There are 197 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Sep 15 13:17:57 UTC 2018. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.18.8-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-4.18.y
and the diffstat can be found below.
Quoted 7 lines
Quoted 3 lines
thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64and i386.
Wonderful, thanks for testing all of these and letting me know.
greg k-h
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.8 release. There are 197 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Sat Sep 15 13:17:57 UTC 2018. Anything received after that time might be too late.
Build results:
total: 139 pass: 139 fail: 0 Qemu test results: total: 221 pass: 221 fail: 0
Details are available at https://kerneltests.org/builders/.
Guenter
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.8 release. There are 197 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 9 lines
Quoted 3 lines
Responses should be made by Sat Sep 15 13:17:57 UTC 2018. Anything received after that time might be too late.
Build results:
total: 139 pass: 139 fail: 0 Qemu test results: total: 221 pass: 221 fail: 0
No wait that was 3.18. Here are the results for 4.18:
Build results:
total: 137 pass: 137 fail: 0 Qemu test results: total: 318 pass: 318 fail: 0
Sorry for the confusion.
Guenter
Greg Kroah-Hartman
maintainerQuoted 7 lines · Guenter Roeck
Quoted 6 lines · Guenter Roeck
Quoted 5 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 4.18.8 release. There are 197 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
Responses should be made by Sat Sep 15 13:17:57 UTC 2018. Anything received after that time might be too late.
Build results:
total: 139 pass: 139 fail: 0 Qemu test results: total: 221 pass: 221 fail: 0
I was wondering what caused the numbers to drop :)
Quoted 8 lines
No wait that was 3.18. Here are the results for 4.18:
Build results:
total: 137 pass: 137 fail: 0 Qemu test results: total: 318 pass: 318 fail: 0Sorry for the confusion.
No problem at all. Thanks for testing all of these and letting me know.
greg k-h
Re: [PATCH 4.18 082/197] block: dont warn for flush on read-only device
In reply to Greg Kroah-HartmanHi Greg,
The follow up patch 8b2ded1c94c0 ("block: don't warn when doing fsync on read-only devices") should get applied too, since it correctly fixes what this patch tried to fix.
--
Stefan
Quoted 33 lines · Greg Kroah-Hartman
4.18-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jens Axboe <[email protected]>
[ Upstream commit
b089cfd95d32638335c551651a8e00fd2c4edb0b]Don't warn for a flush issued to a read-only device. It's not strictly a writable command, as it doesn't change any on-media data by itself.
Reported-by Stefan Agner <[email protected]>Fixes 721c7fc701c7 ("block: fail op_is_write() requests to read-only partitions")Signed-off-by Jens Axboe <[email protected]>Signed-off-by Sasha Levin <[email protected]>Signed-off-by Greg Kroah-Hartman <[email protected]>--- block/blk-core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)block/blk-core.c +3
-1@@ -2159,7 +2159,9 @@ static inline bool should_fail_request(sstatic inline bool bio_check_ro (struct bio *bio,struct hd_struct *part) { -if (part->policy &&op_is_write (bio_op (bio))) { +const int op =bio_op (bio); + +if (part->policy && (op_is_write (op) && !op_is_flush (op))) {char b[BDEVNAME_SIZE ]; WARN_ONCE(1,
Greg Kroah-Hartman
maintainerRe: [PATCH 4.18 082/197] block: dont warn for flush on read-only device
Quoted 5 lines · Stefan Agner
Hi Greg,
The follow up patch
8b2ded1c94c0("block: don't warn when doing fsync on read-only devices") should get applied too, since it correctly fixes what this patch tried to fix.
Already queueud up, thanks!
greg k-h