drm/edid: Abstract away cea_edid_modes[]
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 13 Dec 2019 17:43:45 +0000 (19:43 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 16 Dec 2019 15:20:21 +0000 (17:20 +0200)
commit7befe621ff81d8063c13d6452b04e6ebc92b22fd
tree211e3b20a1491fefde7dbcb471c0ada3f1005dc6
parentc096761718de0a6ac3205d80b12292c943235c4b
drm/edid: Abstract away cea_edid_modes[]

We're going to need two cea mode tables (one for VICs < 128,
another one for VICs >= 193). To that end replace the direct
edid_cea_modes[] lookups with a function call. And we'll rename
the array to edid_cea_modes_0[] to indicate how it's to be
indexed.

v2: Fix typos (Tom)
    Drop the pointless NULL checks in the loops (Tom)
    Assign when declaring (Tom)
    Improve the comment for cea_modes_*[] to indicate
    that one should always use cea_mode_for_vic() (Tom)

Cc: Tom Anderson <thomasanderson@google.com>
Cc: Hans Verkuil <hansverk@cisco.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191213174348.27261-2-ville.syrjala@linux.intel.com
Reviewed-by: Thomas Anderson <thomasanderson@google.com>
drivers/gpu/drm/drm_edid.c