drm/i915/psr: CAN_PSR() macro to check for PSR source and sink support.
authorDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Wed, 3 Jan 2018 21:38:23 +0000 (13:38 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Fri, 12 Jan 2018 23:34:11 +0000 (15:34 -0800)
commit4371d89601c301fdbbdb9616c887ae77b38f6404
tree4d81d00595eac31d369e8626f7d19e1cc7b718bd
parent457f1e5f47024793c7b4095e6647ce48ea0bf697
drm/i915/psr: CAN_PSR() macro to check for PSR source and sink support.

The global variable dev_priv->psr.sink_support is set if an eDP sink
supports PSR. Use this instead of redoing the check with is_edp_psr().
Combine source and sink support checks into a macro that can be used to
return early from psr_{invalidate, single_frame_update, flush}.

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180103213824.1405-2-dhinakaran.pandiyan@intel.com
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_psr.c