mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
drm/rockchip: vop2: Reset used_layers to 0
used_layers should reset to 0 before count
port_mux.
And also fix the follow warning:
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2538:26: warning: Value
stored to 'vp' during its initialization is never read
drivers/gpu/drm/rockchip/rockchip_drm_vop2.c:2537:21: warning: Value
stored to 'layer' during its initialization is never read
Fixes: e013d2544c ("drm/rockchip: vop2: Assign plane for vp by
plane_mask")
Change-Id: I56b1576070392b7b262ef65b19cf14d1bfde0586
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
This commit is contained in:
@@ -2569,8 +2569,8 @@ err:
|
||||
*/
|
||||
static void vop2_layer_map_initial(struct vop2 *vop2, uint32_t current_vp_id)
|
||||
{
|
||||
struct vop2_layer *layer = &vop2->layers[0];
|
||||
struct vop2_video_port *vp = &vop2->vps[0];
|
||||
struct vop2_layer *layer;
|
||||
struct vop2_video_port *vp;
|
||||
struct vop2_win *win;
|
||||
unsigned long win_mask;
|
||||
uint32_t used_layers = 0;
|
||||
@@ -2609,6 +2609,7 @@ static void vop2_layer_map_initial(struct vop2 *vop2, uint32_t current_vp_id)
|
||||
* at the last level of the all the mixers by hardware design,
|
||||
* so we just need to handle (nr_vps - 1) vps here.
|
||||
*/
|
||||
used_layers = 0;
|
||||
for (i = 0; i < vop2->data->nr_vps - 1; i++) {
|
||||
vp = &vop2->vps[i];
|
||||
used_layers += hweight32(vp->win_mask);
|
||||
|
||||
Reference in New Issue
Block a user