drm/i915/dmc: remove unnecessary dmc_id validity check
authorJani Nikula <jani.nikula@intel.com>
Thu, 2 Feb 2023 12:04:50 +0000 (14:04 +0200)
committerJani Nikula <jani.nikula@intel.com>
Thu, 2 Feb 2023 19:34:14 +0000 (21:34 +0200)
The dmc_id comes from for_each_dmc_id() in parse_dmc_fw() ->
parse_dmc_fw_header() -> dmc_mmio_addr_sanity_check(). It's valid by
definition.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/b4e1c862687f79861a5fa4bfa6797ecda2136fab.1675339447.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_dmc.c

index 51109cb..4cc62b0 100644 (file)
@@ -576,11 +576,6 @@ static bool dmc_mmio_addr_sanity_check(struct intel_dmc *dmc,
        u32 start_range, end_range;
        int i;
 
-       if (dmc_id >= DMC_FW_MAX) {
-               drm_warn(&i915->drm, "Unsupported firmware id %u\n", dmc_id);
-               return false;
-       }
-
        if (header_ver == 1) {
                start_range = DMC_MMIO_START_RANGE;
                end_range = DMC_MMIO_END_RANGE;