drm/i915/dmc: extract function to parse css header
authorLucas De Marchi <lucas.demarchi@intel.com>
Fri, 7 Jun 2019 09:12:25 +0000 (02:12 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 17 Jun 2019 19:32:29 +0000 (12:32 -0700)
commit46fcbe4b5e40d5f0862b44cd1c7d9adbbe59f511
treeaaeef66d9d130a92d6924ef7e02e72e92cadb9e3
parent0bba84975b3780db115d396f86518cc8d67fc0ae
drm/i915/dmc: extract function to parse css header

Let's start splitting the parse function, making all of them return the
number of bytes parsed - different versions of the firmware header may
require different sizes for the structures.

v2: rework remaining bytes calculation on new protection for amount of
    bytes read

Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190607091230.1489-5-lucas.demarchi@intel.com
drivers/gpu/drm/i915/intel_csr.c