Skip to content

Commit 9942f90

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: optimize sdw_dpn_prop
before: struct sdw_dpn_prop { u32 num; /* 0 4 */ u32 max_word; /* 4 4 */ u32 min_word; /* 8 4 */ u32 num_words; /* 12 4 */ u32 * words; /* 16 8 */ enum sdw_dpn_type type; /* 24 4 */ u32 max_grouping; /* 28 4 */ bool simple_ch_prep_sm; /* 32 1 */ /* XXX 3 bytes hole, try to pack */ u32 ch_prep_timeout; /* 36 4 */ u32 imp_def_interrupts; /* 40 4 */ u32 max_ch; /* 44 4 */ u32 min_ch; /* 48 4 */ u32 num_channels; /* 52 4 */ u32 * channels; /* 56 8 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 num_ch_combinations; /* 64 4 */ /* XXX 4 bytes hole, try to pack */ u32 * ch_combinations; /* 72 8 */ u32 modes; /* 80 4 */ u32 max_async_buffer; /* 84 4 */ bool block_pack_mode; /* 88 1 */ bool read_only_wordlength; /* 89 1 */ /* XXX 2 bytes hole, try to pack */ u32 port_encoding; /* 92 4 */ struct sdw_dpn_audio_mode * audio_modes; /* 96 8 */ /* size: 104, cachelines: 2, members: 22 */ /* sum members: 95, holes: 3, sum holes: 9 */ /* last cacheline: 40 bytes */ }; after: struct sdw_dpn_prop { struct sdw_dpn_audio_mode * audio_modes; /* 0 8 */ u32 num; /* 8 4 */ u32 max_word; /* 12 4 */ u32 min_word; /* 16 4 */ u32 num_words; /* 20 4 */ u32 * words; /* 24 8 */ enum sdw_dpn_type type; /* 32 4 */ u32 max_grouping; /* 36 4 */ u32 ch_prep_timeout; /* 40 4 */ u32 imp_def_interrupts; /* 44 4 */ u32 max_ch; /* 48 4 */ u32 min_ch; /* 52 4 */ u32 num_channels; /* 56 4 */ u32 num_ch_combinations; /* 60 4 */ /* --- cacheline 1 boundary (64 bytes) --- */ u32 * channels; /* 64 8 */ u32 * ch_combinations; /* 72 8 */ u32 modes; /* 80 4 */ u32 max_async_buffer; /* 84 4 */ u32 port_encoding; /* 88 4 */ bool block_pack_mode; /* 92 1 */ bool read_only_wordlength; /* 93 1 */ bool simple_ch_prep_sm; /* 94 1 */ /* size: 96, cachelines: 2, members: 22 */ /* padding: 1 */ /* last cacheline: 32 bytes */ }; Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 557e28f commit 9942f90

File tree

1 file changed

+9
-9
lines changed
  • include/linux/soundwire

1 file changed

+9
-9
lines changed

include/linux/soundwire/sdw.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ struct sdw_dpn_audio_mode {
288288

289289
/**
290290
* struct sdw_dpn_prop - Data Port DPn properties
291+
* @audio_modes: Audio modes supported
291292
* @num: port number
292293
* @max_word: Maximum number of bits in a Payload Channel Sample, 1 to 64
293294
* (inclusive)
@@ -298,48 +299,47 @@ struct sdw_dpn_audio_mode {
298299
* @type: Data port type. Full, Simplified or Reduced
299300
* @max_grouping: Maximum number of samples that can be grouped together for
300301
* a full data port
301-
* @simple_ch_prep_sm: If the port supports simplified channel prepare state
302-
* machine
303302
* @ch_prep_timeout: Port-specific timeout value, in milliseconds
304303
* @imp_def_interrupts: If set, each bit corresponds to support for
305304
* implementation-defined interrupts
306305
* @max_ch: Maximum channels supported
307306
* @min_ch: Minimum channels supported
308307
* @num_channels: Number of discrete channels supported
309-
* @channels: Discrete channels supported
310308
* @num_ch_combinations: Number of channel combinations supported
309+
* @channels: Discrete channels supported
311310
* @ch_combinations: Channel combinations supported
312311
* @modes: SDW mode supported
313312
* @max_async_buffer: Number of samples that this port can buffer in
314313
* asynchronous modes
314+
* @port_encoding: Payload Channel Sample encoding schemes supported
315315
* @block_pack_mode: Type of block port mode supported
316316
* @read_only_wordlength: Read Only wordlength field in DPN_BlockCtrl1 register
317-
* @port_encoding: Payload Channel Sample encoding schemes supported
318-
* @audio_modes: Audio modes supported
317+
* @simple_ch_prep_sm: If the port supports simplified channel prepare state
318+
* machine
319319
*/
320320
struct sdw_dpn_prop {
321+
struct sdw_dpn_audio_mode *audio_modes;
321322
u32 num;
322323
u32 max_word;
323324
u32 min_word;
324325
u32 num_words;
325326
u32 *words;
326327
enum sdw_dpn_type type;
327328
u32 max_grouping;
328-
bool simple_ch_prep_sm;
329329
u32 ch_prep_timeout;
330330
u32 imp_def_interrupts;
331331
u32 max_ch;
332332
u32 min_ch;
333333
u32 num_channels;
334-
u32 *channels;
335334
u32 num_ch_combinations;
335+
u32 *channels;
336336
u32 *ch_combinations;
337337
u32 modes;
338338
u32 max_async_buffer;
339+
u32 port_encoding;
339340
bool block_pack_mode;
340341
bool read_only_wordlength;
341-
u32 port_encoding;
342-
struct sdw_dpn_audio_mode *audio_modes;
342+
bool simple_ch_prep_sm;
343343
};
344344

345345
/**

0 commit comments

Comments
 (0)