linux/drivers/gpu/drm/msm/disp/dpu1/dpu_rm.c
/**
 * _dpu_rm_release_rsvp - release resources and release a reservation
 * @rm:	KMS handle
 * @rsvp:	RSVP pointer to release and release resources for
 */
release resources and release a reservation
@rm: KMS handle
@rsvp:       RSVP pointer to release and release resources for
release resources and release a reservation @rm : KMS handle @rsvp : RSVP pointer to release and release resources for
static void _dpu_rm_release_rsvp(
		struct dpu_rm *rm,
		struct dpu_rm_rsvp *rsvp,
		struct drm_connector *conn)
{
	struct dpu_rm_rsvp *rsvp_c, *rsvp_n;
	struct dpu_rm_hw_blk *blk;
	enum dpu_hw_blk_type type;
	if (!rsvp)
		return;
	DPU_DEBUG("rel rsvp %d enc %d\n", rsvp->seq, rsvp->enc_id);
	list_for_each_entry_safe(rsvp_c, rsvp_n, &rm->rsvps, list) {
		if (rsvp == rsvp_c) {
			list_del(&rsvp_c->list);
			break;
		}
	}
	for (type = 0; type < DPU_HW_BLK_MAX; type++) {
		list_for_each_entry(blk, &rm->hw_blks[type], list) {
			if (blk->rsvp == rsvp) {
				blk->rsvp = NULL;
				DPU_DEBUG("rel rsvp %d enc %d %d %d\n",
						rsvp->seq, rsvp->enc_id,
						blk->type, blk->id);
			}
			if (blk->rsvp_nxt == rsvp) {
				blk->rsvp_nxt = NULL;
				DPU_DEBUG("rel rsvp_nxt %d enc %d %d %d\n",
						rsvp->seq, rsvp->enc_id,
						blk->type, blk->id);
			}
		}
	}
	kfree(rsvp);
}
static void _dpu_rm_release_rsvp ( struct dpu_rm * rm , struct dpu_rm_rsvp * rsvp , struct drm_connector * conn ) { struct dpu_rm_rsvp * rsvp_c , * rsvp_n ; struct dpu_rm_hw_blk * blk ; enum dpu_hw_blk_type type ; if ( ! rsvp ) return ; DPU_DEBUG ( " \n " , rsvp -> seq , rsvp -> enc_id ) ; list_for_each_entry_safe ( rsvp_c , rsvp_n , & rm -> rsvps , list ) { if ( rsvp == rsvp_c ) { list_del ( & rsvp_c -> list ) ; break ; } } for ( type = 0 ; type < DPU_HW_BLK_MAX ; type ++ ) { list_for_each_entry ( blk , & rm -> hw_blks [ type ] , list ) { if ( blk -> rsvp == rsvp ) { blk -> rsvp = NULL ; DPU_DEBUG ( " \n " , rsvp -> seq , rsvp -> enc_id , blk -> type , blk -> id ) ; } if ( blk -> rsvp_nxt == rsvp ) { blk -> rsvp_nxt = NULL ; DPU_DEBUG ( " \n " , rsvp -> seq , rsvp -> enc_id , blk -> type , blk -> id ) ; } } } kfree ( rsvp ) ; }
_dpu_rm_release_rsvp - release resources and release a reservation
 @rm: KMS handle
 @rsvp:       RSVP pointer to release and release resources for
_dpu_rm_release_rsvp - release resources and release a reservation @rm : KMS handle @rsvp : RSVP pointer to release and release resources for