MLK-20121 drm/imx: dpu: plane: Improve readability for helper source_to_id()
This patch contains code-change-only to improve readability for helper source_to_id(). Less indents are used. Signed-off-by: Liu Ying <victor.liu@nxp.com>pull/10/head
parent
36e0b62e9c
commit
644a119a49
|
@ -127,21 +127,20 @@ static inline int source_to_id(lb_sec_sel_t source)
|
|||
int type = source_to_type(source);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(sources); i++) {
|
||||
if (source == sources[i]) {
|
||||
if (type == DPU_PLANE_SRC_FD ||
|
||||
type == DPU_PLANE_SRC_FW) {
|
||||
while (offset < ARRAY_SIZE(sources)) {
|
||||
if (source_to_type(sources[offset]) ==
|
||||
type)
|
||||
break;
|
||||
offset++;
|
||||
}
|
||||
|
||||
i -= offset;
|
||||
}
|
||||
if (source != sources[i])
|
||||
continue;
|
||||
|
||||
/* FetchLayer */
|
||||
if (type == DPU_PLANE_SRC_FL)
|
||||
return i;
|
||||
|
||||
/* FetchWarp or FetchDecode */
|
||||
while (offset < ARRAY_SIZE(sources)) {
|
||||
if (source_to_type(sources[offset]) == type)
|
||||
break;
|
||||
offset++;
|
||||
}
|
||||
return i - offset;
|
||||
}
|
||||
|
||||
WARN_ON(1);
|
||||
|
|
Loading…
Reference in New Issue