mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 10:04:04 +02:00
drm/i915: Wrap the buf trans tables into a struct
Put a wrapper struct around the buf trans tables so that
we can declare the number of entries and default HDMI entry
alongside the table.
@wrap@
identifier old =~ "^.*translations.*";
fresh identifier new = "_" ## old;
type T;
@@
<...
static const T
- old
+ new
[] = {
...
};
+
+ static const struct intel_ddi_buf_trans old = {
+ .entries = new,
+ .num_entries = ARRAY_SIZE(new),
+ };
...>
@@
identifier wrap.old;
@@
(
- ARRAY_SIZE(old)
+ old.num_entries
|
- old
+ old.entries
)
@@
@@
union intel_ddi_buf_trans_entry {
...
};
+
+struct intel_ddi_buf_trans {
+ const union intel_ddi_buf_trans_entry *entries;
+ u8 num_entries;
+};
v2: Handle adl-p
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210608073603.2408-6-ville.syrjala@linux.intel.com
This commit is contained in:
parent
4542c6cff6
commit
13cee3c123
File diff suppressed because it is too large
Load Diff
|
|
@ -53,6 +53,11 @@ union intel_ddi_buf_trans_entry {
|
|||
struct tgl_dkl_phy_ddi_buf_trans dkl;
|
||||
};
|
||||
|
||||
struct intel_ddi_buf_trans {
|
||||
const union intel_ddi_buf_trans_entry *entries;
|
||||
u8 num_entries;
|
||||
};
|
||||
|
||||
bool is_hobl_buf_trans(const union intel_ddi_buf_trans_entry *table);
|
||||
|
||||
int intel_ddi_hdmi_num_entries(struct intel_encoder *encoder,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user