1. 12 6月, 2020 2 次提交
    • R
      drm/amd/display: Rework dsc to isolate FPU operations · 9ec051bf
      Rodrigo Siqueira 提交于
      When we want to use float point operation on Linux
      we need to use within special kernel protection
      (`kernel_fpu_{begin,end}()`.), otherwise the kernel
      can clobber userspace FPU register state. For detecting
      these issues we use a tool named objtool (with -Ffa
      flags) to highlight the FPU problems, all warnings can
      be summed up as follows:
      
      ./tools/objtool/objtool check -Ffa
      drivers/gpu/drm/amd/display/dc/dml/dml_common_defs.o
      
      [..] dc/dsc/rc_calc.o: warning: objtool: get_qp_set()+0x2f8:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc.o: warning: objtool: dsc_roundf()+0x5:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc.o: warning: objtool: dsc_ceil()+0x5:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc.o: warning: objtool: get_ofs_set()+0x3eb:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc.o: warning: objtool: calc_rc_params()+0x3c:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/dc_dsc.o: warning: objtool:
      get_dsc_bandwidth_range.isra.0()+0x8d:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/dc_dsc.o: warning: objtool: setup_dsc_config()+0x2ef:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc_dpi.o: warning: objtool:copy_pps_fields()+0xbb:
      FPU instruction outside of kernel_fpu_{begin,end}()
      [..] dc/dsc/rc_calc_dpi.o: warning: objtool:
      dscc_compute_dsc_parameters()+0x7b:
      FPU instruction outside of kernel_fpu_{begin,end}()
      
      This commit fixes the above issues by rework DSC as described:
      
      1. Isolate all FPU operations in a single file;
      2. Use FPU flags only in the file that handles FPU operations;
      3. Isolate all functions that require float point operation in static
         functions;
      4. Add a mid-layer function that does not use any float point operation,
         and that could be safely invoked in other parts of the code.
      5. Keep float point operation under DC_FP_{START/END} macro.
      
      CC: Christian König <christian.koenig@amd.com>
      CC: Alexander Deucher <Alexander.Deucher@amd.com>
      CC: Peter Zijlstra <peterz@infradead.org>
      CC: Tony Cheng <tony.cheng@amd.com>
      CC: Harry Wentland <hwentlan@amd.com>
      Signed-off-by: NRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      Reviewed-by: NMikita Lipski <Mikita.Lipski@amd.com>
      Acked-by: NQingqing Zhuo <qingqing.zhuo@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      9ec051bf
    • S
      drm/amdgpu: Replace invalid device ID with a valid device ID · 790243d3
      Sandeep Raghuraman 提交于
      Initializes Powertune data for a specific Hawaii card by fixing what
      looks like a typo in the code. The device ID 66B1 is not a supported
      device ID for this driver, and is not mentioned elsewhere. 67B1 is a
      valid device ID, and is a Hawaii Pro GPU.
      
      I have tested on my R9 390 which has device ID 67B1, and it works
      fine without problems.
      Signed-off-by: NSandeep Raghuraman <sandy.8925@gmail.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      790243d3
  2. 11 6月, 2020 2 次提交
  3. 08 6月, 2020 3 次提交
  4. 04 6月, 2020 9 次提交
  5. 02 6月, 2020 5 次提交
  6. 01 6月, 2020 5 次提交
  7. 30 5月, 2020 3 次提交
  8. 28 5月, 2020 4 次提交
  9. 27 5月, 2020 1 次提交
    • K
      drm/amdgpu: fix device attribute node create failed with multi gpu · ba02fd6b
      Kevin Wang 提交于
      the origin design will use varible of "attr->states" to save node
      supported states on current gpu device, but for multi gpu device, when
      probe second gpu device, the driver will check attribute node states
      from previous gpu device wthether to create attribute node.
      it will cause other gpu device create attribute node faild.
      
      1. add member attr_list into amdgpu_device to link supported device attribute node.
      2. add new structure "struct amdgpu_device_attr_entry{}" to track device attribute state.
      3. drop member "states" from amdgpu_device_attr.
      
      v2:
      1. move "attr_list" into amdgpu_pm and rename to "pm_attr_list".
      2. refine create & remove device node functions parameter.
      
      fix:
      drm/amdgpu: optimize amdgpu device attribute code
      Signed-off-by: NKevin Wang <kevin1.wang@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      ba02fd6b
  10. 26 5月, 2020 1 次提交
  11. 25 5月, 2020 5 次提交