]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/sdvo: Fix handling if zero hbuf size
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 19 Jun 2019 18:03:07 +0000 (21:03 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 11 Jul 2019 13:25:56 +0000 (16:25 +0300)
commit68f2be9a31a18c18c8ef11f4b5586f803b3a310f
treece08ae9b46d97f93535a663eaac2b305f79488ab
parent543e9a0212f177008a515df92fe5aecb214374b9
drm/i915/sdvo: Fix handling if zero hbuf size

The spec says:
"A value of 0 indicates that this buffer does not exist"
So we should not convert a hbuf_size of 0 into 1.

Also pull the relevant code into a helper to avoid making the
same mistake multiple times.

And while at it fix the debug prints to not say "hbuf_len" twice.

v2: s/%i/%u/ in the debug (Imre)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190619180312.31817-1-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/display/intel_sdvo.c