|
@@ -90,7 +90,7 @@
|
|
|
struct mdp5_smp {
|
|
|
struct drm_device *dev;
|
|
|
|
|
|
- const struct mdp5_smp_block *cfg;
|
|
|
+ uint8_t reserved[MAX_CLIENTS]; /* fixed MMBs allocation per client */
|
|
|
|
|
|
int blk_cnt;
|
|
|
int blk_size;
|
|
@@ -141,10 +141,10 @@ static int smp_request_block(struct mdp5_smp *smp,
|
|
|
struct mdp5_kms *mdp5_kms = get_kms(smp);
|
|
|
struct mdp5_client_smp_state *ps = &smp->client_state[cid];
|
|
|
int i, ret, avail, cur_nblks, cnt = smp->blk_cnt;
|
|
|
- int reserved;
|
|
|
+ uint8_t reserved;
|
|
|
unsigned long flags;
|
|
|
|
|
|
- reserved = smp->cfg->reserved[cid];
|
|
|
+ reserved = smp->reserved[cid];
|
|
|
|
|
|
spin_lock_irqsave(&smp->state_lock, flags);
|
|
|
|
|
@@ -405,12 +405,12 @@ struct mdp5_smp *mdp5_smp_init(struct drm_device *dev, const struct mdp5_smp_blo
|
|
|
}
|
|
|
|
|
|
smp->dev = dev;
|
|
|
- smp->cfg = cfg;
|
|
|
smp->blk_cnt = cfg->mmb_count;
|
|
|
smp->blk_size = cfg->mmb_size;
|
|
|
|
|
|
/* statically tied MMBs cannot be re-allocated: */
|
|
|
bitmap_copy(smp->state, cfg->reserved_state, smp->blk_cnt);
|
|
|
+ memcpy(smp->reserved, cfg->reserved, sizeof(smp->reserved));
|
|
|
spin_lock_init(&smp->state_lock);
|
|
|
|
|
|
return smp;
|