• Swati Sharma's avatar
    drm/i915/display: Add func to compare hw/sw gamma lut · e9c8f591
    Swati Sharma authored
    Add func intel_color_lut_equal() to compare hw/sw gamma
    lut values. Since hw/sw gamma lut sizes and lut entries comparison
    will be different for different gamma modes, add gamma mode dependent
    checks.
    
    v3:  -Rebase
    v4:  -Renamed intel_compare_color_lut() to intel_color_lut_equal() [Jani]
         -Added the default label above the correct label [Jani]
         -Corrected smatch warn "variable dereferenced before check"
          [Dan Carpenter]
    v5:  -Added condition (!blob1 && !blob2) return true [Jani]
    v6:  -Made patch11 as patch3 [Jani]
    v8:  -Split patch 3 into 4 patches
         -Optimized blob check condition [Ville]
    v9:  -Exclude spilt gamma mode (bdw and ivb platforms)
          as there is exception in way gamma values are written in
          hardware [Ville]
         -Added exception made in commit [Uma]
         -Dropped else, character limit and indentation [Uma]
         -Added multi segmented gama mode for icl+ platforms [Uma]
    v10: -Dropped multi segmented mode for icl+ platforms [Jani]
         -Removed references of sw and hw state in compare code [Jani]
         -Dropped inline from func [Jani]
    Signed-off-by: default avatarSwati Sharma <swati2.sharma@intel.com>
    Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/1567538578-4489-4-git-send-email-swati2.sharma@intel.com
    e9c8f591
intel_color.c 44 KB