1. 01 7月, 2021 4 次提交
    • L
      drm/amdgpu: Use explicit cardinality for clarity · e4e6a589
      Luben Tuikov 提交于
      RAS_MAX_RECORD_NUM may mean the maximum record
      number, as in the maximum house number on your
      street, or it may mean the maximum number of
      records, as in the count of records, which is also
      a number. To make this distinction whether the
      number is ordinal (index) or cardinal (count),
      rename this macro to RAS_MAX_RECORD_COUNT.
      
      This makes it easy to understand what it refers
      to, especially when we compute quantities such as,
      how many records do we have left in the table,
      especially when there are so many other numbers,
      quantities and numerical macros around.
      
      Also rename the long,
      amdgpu_ras_eeprom_get_record_max_length() to the
      more succinct and clear,
      amdgpu_ras_eeprom_max_record_count().
      
      When computing the threshold, which also deals
      with counts, i.e. "how many", use cardinal
      "max_eeprom_records_count", than the quantitative
      "max_eeprom_records_len".
      
      Simplify the logic here and there, as well.
      
      Cc: Guchun Chen <guchun.chen@amd.com>
      Cc: John Clements <john.clements@amd.com>
      Cc: Hawking Zhang <Hawking.Zhang@amd.com>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: NAlexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      e4e6a589
    • L
      drm/amdgpu: Return result fix in RAS · cf696091
      Luben Tuikov 提交于
      The low level EEPROM write method, doesn't return
      1, but the number of bytes written. Thus do not
      compare to 1, instead, compare to greater than 0
      for success.
      
      Other cleanup: if the lower layers returned
      -errno, then return that, as opposed to
      overwriting the error code with one-fits-all
      -EINVAL. For instance, some return -EAGAIN.
      
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Lijo Lazar <Lijo.Lazar@amd.com>
      Cc: Stanley Yang <Stanley.Yang@amd.com>
      Cc: Hawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
      Reviewed-by: NAlexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      cf696091
    • L
      drm/amdgpu: RAS xfer to read/write · 1fab841f
      Luben Tuikov 提交于
      Wrap amdgpu_ras_eeprom_xfer(..., bool write),
      into amdgpu_ras_eeprom_read() and
      amdgpu_ras_eeprom_write(), as that makes reading
      and understanding the code clearer.
      
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Lijo Lazar <Lijo.Lazar@amd.com>
      Cc: Stanley Yang <Stanley.Yang@amd.com>
      Cc: Hawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: NAlexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      1fab841f
    • L
      drm/amdgpu: Rename misspelled function · a4399657
      Luben Tuikov 提交于
      Instead of fixing the spelling in
        amdgpu_ras_eeprom_process_recods(),
      rename it to,
        amdgpu_ras_eeprom_xfer(),
      to look similar to other I2C and protocol
      transfer (read/write) functions.
      
      Also to keep the column span to within reason by
      using a shorter name.
      
      Change the "num" function parameter from "int" to
      "const u32" since it is the number of items
      (records) to xfer, i.e. their count, which cannot
      be a negative number.
      
      Also swap the order of parameters, keeping the
      pointer to records and their number next to each
      other, while the direction now becomes the last
      parameter.
      
      Cc: Jean Delvare <jdelvare@suse.de>
      Cc: Alexander Deucher <Alexander.Deucher@amd.com>
      Cc: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com>
      Cc: Lijo Lazar <Lijo.Lazar@amd.com>
      Cc: Stanley Yang <Stanley.Yang@amd.com>
      Cc: Hawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: NLuben Tuikov <luben.tuikov@amd.com>
      Acked-by: NAlexander Deucher <Alexander.Deucher@amd.com>
      Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
      a4399657
  2. 19 6月, 2021 2 次提交
  3. 12 6月, 2021 1 次提交
  4. 28 5月, 2021 2 次提交
  5. 20 5月, 2021 2 次提交
  6. 11 5月, 2021 11 次提交
  7. 29 4月, 2021 1 次提交
  8. 24 4月, 2021 2 次提交
  9. 21 4月, 2021 2 次提交
  10. 16 4月, 2021 5 次提交
  11. 10 4月, 2021 8 次提交