drm/i915: Add crtc->plane_ids_mask

Add a mask of which planes are available for each pipe. This doesn't
quite work for old platforms with dynamic plane<->pipe assignment, but
as we don't support that sort of stuff (yet) we can get away with it.

The main use I have for this is the for_each_plane_id_on_crtc() macro
for iterating over all possible planes on the crtc. I suppose we could
not add the mask, and instead iterate by comparing intel_plane->pipe
but then we'd need a local intel_plane variable which is just
unnecessary clutter in some cases. But I'm not hung up on this, so if
people prefer the other option I could be convinced to use it.

v2: Use BIT() in the iterator macro too (Paulo)

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479830524-7882-3-git-send-email-ville.syrjala@linux.intel.com
此提交包含在:
Ville Syrjälä
2016-11-22 18:01:57 +02:00
父節點 b14e5848c0
當前提交 d97d7b48b6
共有 3 個檔案被更改,包括 9 行新增1 行删除

查看文件

@@ -691,8 +691,9 @@ struct intel_crtc {
* some outputs connected to this crtc.
*/
bool active;
unsigned long enabled_power_domains;
bool lowfreq_avail;
u8 plane_ids_mask;
unsigned long enabled_power_domains;
struct intel_overlay *overlay;
struct intel_flip_work *flip_work;