OSDN Git Service

drm/i915/psr: Refactor psr short pulse handler
authorJosé Roberto de Souza <jose.souza@intel.com>
Thu, 28 Nov 2019 01:48:49 +0000 (17:48 -0800)
committerJosé Roberto de Souza <jose.souza@intel.com>
Mon, 2 Dec 2019 20:06:14 +0000 (12:06 -0800)
commit95851205f9b3d2bb81cc5f63afd1124c9eb79940
tree7cc560189aee31969962f0bfff40df828d441540
parentf98837e85fcdcdbeec3cadc40456da85d07256a3
drm/i915/psr: Refactor psr short pulse handler

eDP spec states that when sink enconters a problem that prevents it
to keep PSR running it should set PSR status to internal error and
set the reason why it happen to PSR_ERROR_STATUS but it is not how it
was implemented.
But also I don't want to change this behavior, who knows if there is
a panel out there that only set the PSR_ERROR_STATUS.

So here refactoring the code a bit to make more easy to read what was
state above as more checks will be added to this function.

v2:
returning a int instead of a bool in psr_get_status_and_error_status()

Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191128014852.214135-2-jose.souza@intel.com
drivers/gpu/drm/i915/display/intel_psr.c