struct v4l2_subdev_format *fmt)
 {
        struct vsp1_brx *brx = to_brx(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
        mutex_lock(&brx->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&brx->entity, sd_state,
-                                           fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&brx->entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
-       brx_try_format(brx, config, fmt->pad, &fmt->format);
+       brx_try_format(brx, state, fmt->pad, &fmt->format);
 
-       format = vsp1_entity_get_pad_format(&brx->entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(&brx->entity, state, fmt->pad);
        *format = fmt->format;
 
        /* Reset the compose rectangle. */
        if (fmt->pad != brx->entity.source_pad) {
                struct v4l2_rect *compose;
 
-               compose = brx_get_compose(brx, config, fmt->pad);
+               compose = brx_get_compose(brx, state, fmt->pad);
                compose->left = 0;
                compose->top = 0;
                compose->width = format->width;
 
                for (i = 0; i <= brx->entity.source_pad; ++i) {
                        format = vsp1_entity_get_pad_format(&brx->entity,
-                                                           config, i);
+                                                           state, i);
                        format->code = fmt->format.code;
                }
        }
                             struct v4l2_subdev_selection *sel)
 {
        struct vsp1_brx *brx = to_brx(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
 
        if (sel->pad == brx->entity.source_pad)
                return -EINVAL;
                return 0;
 
        case V4L2_SEL_TGT_COMPOSE:
-               config = vsp1_entity_get_pad_config(&brx->entity, sd_state,
-                                                   sel->which);
-               if (!config)
+               state = vsp1_entity_get_state(&brx->entity, sd_state,
+                                             sel->which);
+               if (!state)
                        return -EINVAL;
 
                mutex_lock(&brx->entity.lock);
-               sel->r = *brx_get_compose(brx, config, sel->pad);
+               sel->r = *brx_get_compose(brx, state, sel->pad);
                mutex_unlock(&brx->entity.lock);
                return 0;
 
                             struct v4l2_subdev_selection *sel)
 {
        struct vsp1_brx *brx = to_brx(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        struct v4l2_rect *compose;
        int ret = 0;
 
        mutex_lock(&brx->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&brx->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&brx->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
         * The compose rectangle top left corner must be inside the output
         * frame.
         */
-       format = vsp1_entity_get_pad_format(&brx->entity, config,
+       format = vsp1_entity_get_pad_format(&brx->entity, state,
                                            brx->entity.source_pad);
        sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1);
        sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1);
         * Scaling isn't supported, the compose rectangle size must be identical
         * to the sink format size.
         */
-       format = vsp1_entity_get_pad_format(&brx->entity, config, sel->pad);
+       format = vsp1_entity_get_pad_format(&brx->entity, state, sel->pad);
        sel->r.width = format->width;
        sel->r.height = format->height;
 
-       compose = brx_get_compose(brx, config, sel->pad);
+       compose = brx_get_compose(brx, state, sel->pad);
        *compose = sel->r;
 
 done:
        unsigned int flags;
        unsigned int i;
 
-       format = vsp1_entity_get_pad_format(&brx->entity, brx->entity.config,
+       format = vsp1_entity_get_pad_format(&brx->entity, brx->entity.state,
                                            brx->entity.source_pad);
 
        /*
 
         * The yuv_mode can't be changed during streaming. Cache it internally
         * for future runtime configuration calls.
         */
-       format = vsp1_entity_get_pad_format(&clu->entity,
-                                           clu->entity.config,
+       format = vsp1_entity_get_pad_format(&clu->entity, clu->entity.state,
                                            CLU_PAD_SINK);
        clu->yuv_mode = format->code == MEDIA_BUS_FMT_AYUV8_1X32;
 }
 
  */
 
 /**
- * vsp1_entity_get_pad_config - Get the pad configuration for an entity
+ * vsp1_entity_get_state - Get the subdev state for an entity
  * @entity: the entity
  * @sd_state: the TRY state
- * @which: configuration selector (ACTIVE or TRY)
+ * @which: state selector (ACTIVE or TRY)
  *
  * When called with which set to V4L2_SUBDEV_FORMAT_ACTIVE the caller must hold
  * the entity lock to access the returned configuration.
  *
- * Return the pad configuration requested by the which argument. The TRY
- * configuration is passed explicitly to the function through the cfg argument
- * and simply returned when requested. The ACTIVE configuration comes from the
- * entity structure.
+ * Return the subdev state requested by the which argument. The TRY state is
+ * passed explicitly to the function through the sd_state argument and simply
+ * returned when requested. The ACTIVE state comes from the entity structure.
  */
 struct v4l2_subdev_state *
-vsp1_entity_get_pad_config(struct vsp1_entity *entity,
-                          struct v4l2_subdev_state *sd_state,
-                          enum v4l2_subdev_format_whence which)
+vsp1_entity_get_state(struct vsp1_entity *entity,
+                     struct v4l2_subdev_state *sd_state,
+                     enum v4l2_subdev_format_whence which)
 {
        switch (which) {
        case V4L2_SUBDEV_FORMAT_ACTIVE:
-               return entity->config;
+               return entity->state;
        case V4L2_SUBDEV_FORMAT_TRY:
        default:
                return sd_state;
 /*
  * vsp1_entity_init_cfg - Initialize formats on all pads
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  *
- * Initialize all pad formats with default values in the given pad config. This
- * function can be used as a handler for the subdev pad::init_cfg operation.
+ * Initialize all pad formats with default values in the given subdev state.
+ * This function can be used as a handler for the subdev pad::init_cfg
+ * operation.
  */
 int vsp1_entity_init_cfg(struct v4l2_subdev *subdev,
                         struct v4l2_subdev_state *sd_state)
 /*
  * vsp1_subdev_get_pad_format - Subdev pad get_fmt handler
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @fmt: V4L2 subdev format
  *
  * This function implements the subdev get_fmt pad operation. It can be used as
                               struct v4l2_subdev_format *fmt)
 {
        struct vsp1_entity *entity = to_vsp1_entity(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
 
-       config = vsp1_entity_get_pad_config(entity, sd_state, fmt->which);
-       if (!config)
+       state = vsp1_entity_get_state(entity, sd_state, fmt->which);
+       if (!state)
                return -EINVAL;
 
        mutex_lock(&entity->lock);
-       fmt->format = *vsp1_entity_get_pad_format(entity, config, fmt->pad);
+       fmt->format = *vsp1_entity_get_pad_format(entity, state, fmt->pad);
        mutex_unlock(&entity->lock);
 
        return 0;
 /*
  * vsp1_subdev_enum_mbus_code - Subdev pad enum_mbus_code handler
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @code: Media bus code enumeration
  * @codes: Array of supported media bus codes
  * @ncodes: Number of supported media bus codes
 
                code->code = codes[code->index];
        } else {
-               struct v4l2_subdev_state *config;
+               struct v4l2_subdev_state *state;
                struct v4l2_mbus_framefmt *format;
 
                /*
                if (code->index)
                        return -EINVAL;
 
-               config = vsp1_entity_get_pad_config(entity, sd_state,
-                                                   code->which);
-               if (!config)
+               state = vsp1_entity_get_state(entity, sd_state, code->which);
+               if (!state)
                        return -EINVAL;
 
                mutex_lock(&entity->lock);
-               format = vsp1_entity_get_pad_format(entity, config, 0);
+               format = vsp1_entity_get_pad_format(entity, state, 0);
                code->code = format->code;
                mutex_unlock(&entity->lock);
        }
 /*
  * vsp1_subdev_enum_frame_size - Subdev pad enum_frame_size handler
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @fse: Frame size enumeration
  * @min_width: Minimum image width
  * @min_height: Minimum image height
                                unsigned int max_width, unsigned int max_height)
 {
        struct vsp1_entity *entity = to_vsp1_entity(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
-       config = vsp1_entity_get_pad_config(entity, sd_state, fse->which);
-       if (!config)
+       state = vsp1_entity_get_state(entity, sd_state, fse->which);
+       if (!state)
                return -EINVAL;
 
-       format = vsp1_entity_get_pad_format(entity, config, fse->pad);
+       format = vsp1_entity_get_pad_format(entity, state, fse->pad);
 
        mutex_lock(&entity->lock);
 
 /*
  * vsp1_subdev_set_pad_format - Subdev pad set_fmt handler
  * @subdev: V4L2 subdevice
- * @cfg: V4L2 subdev pad configuration
+ * @sd_state: V4L2 subdev state
  * @fmt: V4L2 subdev format
  * @codes: Array of supported media bus codes
  * @ncodes: Number of supported media bus codes
                               unsigned int max_width, unsigned int max_height)
 {
        struct vsp1_entity *entity = to_vsp1_entity(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        struct v4l2_rect *selection;
        unsigned int i;
 
        mutex_lock(&entity->lock);
 
-       config = vsp1_entity_get_pad_config(entity, sd_state, fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
-       format = vsp1_entity_get_pad_format(entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(entity, state, fmt->pad);
 
        if (fmt->pad == entity->source_pad) {
                /* The output format can't be modified. */
        fmt->format = *format;
 
        /* Propagate the format to the source pad. */
-       format = vsp1_entity_get_pad_format(entity, config, entity->source_pad);
+       format = vsp1_entity_get_pad_format(entity, state, entity->source_pad);
        *format = fmt->format;
 
        /* Reset the crop and compose rectangles. */
-       selection = vsp1_entity_get_pad_selection(entity, config, fmt->pad,
+       selection = vsp1_entity_get_pad_selection(entity, state, fmt->pad,
                                                  V4L2_SEL_TGT_CROP);
        selection->left = 0;
        selection->top = 0;
        selection->width = format->width;
        selection->height = format->height;
 
-       selection = vsp1_entity_get_pad_selection(entity, config, fmt->pad,
+       selection = vsp1_entity_get_pad_selection(entity, state, fmt->pad,
                                                  V4L2_SEL_TGT_COMPOSE);
        selection->left = 0;
        selection->top = 0;
        vsp1_entity_init_cfg(subdev, NULL);
 
        /*
-        * Allocate the pad configuration to store formats and selection
+        * Allocate the subdev state to store formats and selection
         * rectangles.
         */
        /*
         * FIXME: Drop this call, drivers are not supposed to use
         * __v4l2_subdev_state_alloc().
         */
-       entity->config = __v4l2_subdev_state_alloc(&entity->subdev,
-                                                  "vsp1:config->lock", &key);
-       if (IS_ERR(entity->config)) {
+       entity->state = __v4l2_subdev_state_alloc(&entity->subdev,
+                                                 "vsp1:state->lock", &key);
+       if (IS_ERR(entity->state)) {
                media_entity_cleanup(&entity->subdev.entity);
-               return PTR_ERR(entity->config);
+               return PTR_ERR(entity->state);
        }
 
        return 0;
                entity->ops->destroy(entity);
        if (entity->subdev.ctrl_handler)
                v4l2_ctrl_handler_free(entity->subdev.ctrl_handler);
-       __v4l2_subdev_state_free(entity->config);
+       __v4l2_subdev_state_free(entity->state);
        media_entity_cleanup(&entity->subdev.entity);
 }
 
        unsigned int sink_pad;
 
        struct v4l2_subdev subdev;
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
 
-       struct mutex lock;      /* Protects the pad config */
+       struct mutex lock;      /* Protects the state */
 };
 
 static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev)
                           const struct media_pad *remote, u32 flags);
 
 struct v4l2_subdev_state *
-vsp1_entity_get_pad_config(struct vsp1_entity *entity,
-                          struct v4l2_subdev_state *sd_state,
-                          enum v4l2_subdev_format_whence which);
+vsp1_entity_get_state(struct vsp1_entity *entity,
+                     struct v4l2_subdev_state *sd_state,
+                     enum v4l2_subdev_format_whence which);
 struct v4l2_mbus_framefmt *
 vsp1_entity_get_pad_format(struct vsp1_entity *entity,
                           struct v4l2_subdev_state *sd_state,
 
        unsigned int hratio;
        unsigned int vratio;
 
-       crop = vsp1_entity_get_pad_selection(entity, entity->config,
+       crop = vsp1_entity_get_pad_selection(entity, entity->state,
                                             HISTO_PAD_SINK, V4L2_SEL_TGT_CROP);
-       compose = vsp1_entity_get_pad_selection(entity, entity->config,
+       compose = vsp1_entity_get_pad_selection(entity, entity->state,
                                                HISTO_PAD_SINK,
                                                V4L2_SEL_TGT_COMPOSE);
 
 
        u8 upper;
        unsigned int i;
 
-       crop = vsp1_entity_get_pad_selection(entity, entity->config,
+       crop = vsp1_entity_get_pad_selection(entity, entity->state,
                                             HISTO_PAD_SINK, V4L2_SEL_TGT_CROP);
-       compose = vsp1_entity_get_pad_selection(entity, entity->config,
+       compose = vsp1_entity_get_pad_selection(entity, entity->state,
                                                HISTO_PAD_SINK,
                                                V4L2_SEL_TGT_COMPOSE);
 
 
                               struct v4l2_subdev_selection *sel)
 {
        struct vsp1_histogram *histo = subdev_to_histo(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        struct v4l2_rect *crop;
        int ret = 0;
 
        mutex_lock(&histo->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&histo->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&histo->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
        switch (sel->target) {
        case V4L2_SEL_TGT_COMPOSE_BOUNDS:
        case V4L2_SEL_TGT_COMPOSE_DEFAULT:
-               crop = vsp1_entity_get_pad_selection(&histo->entity, config,
+               crop = vsp1_entity_get_pad_selection(&histo->entity, state,
                                                     HISTO_PAD_SINK,
                                                     V4L2_SEL_TGT_CROP);
                sel->r.left = 0;
 
        case V4L2_SEL_TGT_CROP_BOUNDS:
        case V4L2_SEL_TGT_CROP_DEFAULT:
-               format = vsp1_entity_get_pad_format(&histo->entity, config,
+               format = vsp1_entity_get_pad_format(&histo->entity, state,
                                                    HISTO_PAD_SINK);
                sel->r.left = 0;
                sel->r.top = 0;
 
        case V4L2_SEL_TGT_COMPOSE:
        case V4L2_SEL_TGT_CROP:
-               sel->r = *vsp1_entity_get_pad_selection(&histo->entity, config,
+               sel->r = *vsp1_entity_get_pad_selection(&histo->entity, state,
                                                        sel->pad, sel->target);
                break;
 
                               struct v4l2_subdev_selection *sel)
 {
        struct vsp1_histogram *histo = subdev_to_histo(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        int ret;
 
        if (sel->pad != HISTO_PAD_SINK)
 
        mutex_lock(&histo->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&histo->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&histo->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
        if (sel->target == V4L2_SEL_TGT_CROP)
-               ret = histo_set_crop(subdev, config, sel);
+               ret = histo_set_crop(subdev, state, sel);
        else if (sel->target == V4L2_SEL_TGT_COMPOSE)
-               ret = histo_set_compose(subdev, config, sel);
+               ret = histo_set_compose(subdev, state, sel);
        else
                ret = -EINVAL;
 
 
                           struct v4l2_subdev_format *fmt)
 {
        struct vsp1_hsit *hsit = to_hsit(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
        mutex_lock(&hsit->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&hsit->entity, sd_state,
-                                           fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&hsit->entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
-       format = vsp1_entity_get_pad_format(&hsit->entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(&hsit->entity, state, fmt->pad);
 
        if (fmt->pad == HSIT_PAD_SOURCE) {
                /*
        fmt->format = *format;
 
        /* Propagate the format to the source pad. */
-       format = vsp1_entity_get_pad_format(&hsit->entity, config,
+       format = vsp1_entity_get_pad_format(&hsit->entity, state,
                                            HSIT_PAD_SOURCE);
        *format = fmt->format;
        format->code = hsit->inverse ? MEDIA_BUS_FMT_ARGB8888_1X32
 
        unsigned int obth;
        unsigned int lbth;
 
-       format = vsp1_entity_get_pad_format(&lif->entity, lif->entity.config,
+       format = vsp1_entity_get_pad_format(&lif->entity, lif->entity.state,
                                            LIF_PAD_SOURCE);
 
        switch (entity->vsp1->version & VI6_IP_VERSION_MODEL_MASK) {
 
 
        /* Format */
        sink_format = vsp1_entity_get_pad_format(&rpf->entity,
-                                                rpf->entity.config,
+                                                rpf->entity.state,
                                                 RWPF_PAD_SINK);
        source_format = vsp1_entity_get_pad_format(&rpf->entity,
-                                                  rpf->entity.config,
+                                                  rpf->entity.state,
                                                   RWPF_PAD_SOURCE);
 
        infmt = VI6_RPF_INFMT_CIPM
                const struct v4l2_rect *compose;
 
                compose = vsp1_entity_get_pad_selection(pipe->brx,
-                                                       pipe->brx->config,
+                                                       pipe->brx->state,
                                                        rpf->brx_input,
                                                        V4L2_SEL_TGT_COMPOSE);
                left = compose->left;
         * offsets are needed, as planes 2 and 3 always have identical
         * strides.
         */
-       crop = *vsp1_rwpf_get_crop(rpf, rpf->entity.config);
+       crop = *vsp1_rwpf_get_crop(rpf, rpf->entity.state);
 
        /*
         * Partition Algorithm Control
 
                                struct v4l2_subdev_format *fmt)
 {
        struct vsp1_rwpf *rwpf = to_rwpf(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
        mutex_lock(&rwpf->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&rwpf->entity, sd_state,
-                                           fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&rwpf->entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
            fmt->format.code != MEDIA_BUS_FMT_AYUV8_1X32)
                fmt->format.code = MEDIA_BUS_FMT_AYUV8_1X32;
 
-       format = vsp1_entity_get_pad_format(&rwpf->entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(&rwpf->entity, state, fmt->pad);
 
        if (fmt->pad == RWPF_PAD_SOURCE) {
                /*
                struct v4l2_rect *crop;
 
                /* Update the sink crop rectangle. */
-               crop = vsp1_rwpf_get_crop(rwpf, config);
+               crop = vsp1_rwpf_get_crop(rwpf, state);
                crop->left = 0;
                crop->top = 0;
                crop->width = fmt->format.width;
        }
 
        /* Propagate the format to the source pad. */
-       format = vsp1_entity_get_pad_format(&rwpf->entity, config,
+       format = vsp1_entity_get_pad_format(&rwpf->entity, state,
                                            RWPF_PAD_SOURCE);
        *format = fmt->format;
 
                                   struct v4l2_subdev_selection *sel)
 {
        struct vsp1_rwpf *rwpf = to_rwpf(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
 
        mutex_lock(&rwpf->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&rwpf->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&rwpf->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
        switch (sel->target) {
        case V4L2_SEL_TGT_CROP:
-               sel->r = *vsp1_rwpf_get_crop(rwpf, config);
+               sel->r = *vsp1_rwpf_get_crop(rwpf, state);
                break;
 
        case V4L2_SEL_TGT_CROP_BOUNDS:
-               format = vsp1_entity_get_pad_format(&rwpf->entity, config,
+               format = vsp1_entity_get_pad_format(&rwpf->entity, state,
                                                    RWPF_PAD_SINK);
                sel->r.left = 0;
                sel->r.top = 0;
                                   struct v4l2_subdev_selection *sel)
 {
        struct vsp1_rwpf *rwpf = to_rwpf(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        struct v4l2_rect *crop;
        int ret = 0;
 
        mutex_lock(&rwpf->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&rwpf->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&rwpf->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
        /* Make sure the crop rectangle is entirely contained in the image. */
-       format = vsp1_entity_get_pad_format(&rwpf->entity, config,
+       format = vsp1_entity_get_pad_format(&rwpf->entity, state,
                                            RWPF_PAD_SINK);
 
        /*
        sel->r.height = min_t(unsigned int, sel->r.height,
                              format->height - sel->r.top);
 
-       crop = vsp1_rwpf_get_crop(rwpf, config);
+       crop = vsp1_rwpf_get_crop(rwpf, state);
        *crop = sel->r;
 
        /* Propagate the format to the source pad. */
-       format = vsp1_entity_get_pad_format(&rwpf->entity, config,
+       format = vsp1_entity_get_pad_format(&rwpf->entity, state,
                                            RWPF_PAD_SOURCE);
        format->width = crop->width;
        format->height = crop->height;
 
                               struct v4l2_subdev_frame_size_enum *fse)
 {
        struct vsp1_sru *sru = to_sru(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
-       config = vsp1_entity_get_pad_config(&sru->entity, sd_state,
-                                           fse->which);
-       if (!config)
+       state = vsp1_entity_get_state(&sru->entity, sd_state, fse->which);
+       if (!state)
                return -EINVAL;
 
-       format = vsp1_entity_get_pad_format(&sru->entity, config, SRU_PAD_SINK);
+       format = vsp1_entity_get_pad_format(&sru->entity, state, SRU_PAD_SINK);
 
        mutex_lock(&sru->entity.lock);
 
                          struct v4l2_subdev_format *fmt)
 {
        struct vsp1_sru *sru = to_sru(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
        mutex_lock(&sru->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&sru->entity, sd_state,
-                                           fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&sru->entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
-       sru_try_format(sru, config, fmt->pad, &fmt->format);
+       sru_try_format(sru, state, fmt->pad, &fmt->format);
 
-       format = vsp1_entity_get_pad_format(&sru->entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(&sru->entity, state, fmt->pad);
        *format = fmt->format;
 
        if (fmt->pad == SRU_PAD_SINK) {
                /* Propagate the format to the source pad. */
-               format = vsp1_entity_get_pad_format(&sru->entity, config,
+               format = vsp1_entity_get_pad_format(&sru->entity, state,
                                                    SRU_PAD_SOURCE);
                *format = fmt->format;
 
-               sru_try_format(sru, config, SRU_PAD_SOURCE, format);
+               sru_try_format(sru, state, SRU_PAD_SOURCE, format);
        }
 
 done:
        struct v4l2_mbus_framefmt *output;
        u32 ctrl0;
 
-       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                           SRU_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                            SRU_PAD_SOURCE);
 
        if (input->code == MEDIA_BUS_FMT_ARGB8888_1X32)
        struct v4l2_mbus_framefmt *input;
        struct v4l2_mbus_framefmt *output;
 
-       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                           SRU_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                            SRU_PAD_SOURCE);
 
        /*
        struct v4l2_mbus_framefmt *input;
        struct v4l2_mbus_framefmt *output;
 
-       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       input = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                           SRU_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.config,
+       output = vsp1_entity_get_pad_format(&sru->entity, sru->entity.state,
                                            SRU_PAD_SOURCE);
 
        /* Adapt if SRUx2 is enabled. */
 
                               struct v4l2_subdev_frame_size_enum *fse)
 {
        struct vsp1_uds *uds = to_uds(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
-       config = vsp1_entity_get_pad_config(&uds->entity, sd_state,
-                                           fse->which);
-       if (!config)
+       state = vsp1_entity_get_state(&uds->entity, sd_state, fse->which);
+       if (!state)
                return -EINVAL;
 
-       format = vsp1_entity_get_pad_format(&uds->entity, config,
-                                           UDS_PAD_SINK);
+       format = vsp1_entity_get_pad_format(&uds->entity, state, UDS_PAD_SINK);
 
        mutex_lock(&uds->entity.lock);
 
                          struct v4l2_subdev_format *fmt)
 {
        struct vsp1_uds *uds = to_uds(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
        mutex_lock(&uds->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&uds->entity, sd_state,
-                                           fmt->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&uds->entity, sd_state, fmt->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
-       uds_try_format(uds, config, fmt->pad, &fmt->format);
+       uds_try_format(uds, state, fmt->pad, &fmt->format);
 
-       format = vsp1_entity_get_pad_format(&uds->entity, config, fmt->pad);
+       format = vsp1_entity_get_pad_format(&uds->entity, state, fmt->pad);
        *format = fmt->format;
 
        if (fmt->pad == UDS_PAD_SINK) {
                /* Propagate the format to the source pad. */
-               format = vsp1_entity_get_pad_format(&uds->entity, config,
+               format = vsp1_entity_get_pad_format(&uds->entity, state,
                                                    UDS_PAD_SOURCE);
                *format = fmt->format;
 
-               uds_try_format(uds, config, UDS_PAD_SOURCE, format);
+               uds_try_format(uds, state, UDS_PAD_SOURCE, format);
        }
 
 done:
        unsigned int vscale;
        bool multitap;
 
-       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                           UDS_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                            UDS_PAD_SOURCE);
 
        hscale = uds_compute_ratio(input->width, output->width);
        struct vsp1_partition *partition = pipe->partition;
        const struct v4l2_mbus_framefmt *output;
 
-       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                            UDS_PAD_SOURCE);
 
        /* Input size clipping. */
        const struct v4l2_mbus_framefmt *input;
        unsigned int hscale;
 
-       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                           UDS_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                            UDS_PAD_SOURCE);
        hscale = output->width / input->width;
 
        partition->uds_sink = *window;
        partition->uds_source = *window;
 
-       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       input = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                           UDS_PAD_SINK);
-       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.config,
+       output = vsp1_entity_get_pad_format(&uds->entity, uds->entity.state,
                                            UDS_PAD_SOURCE);
 
        partition->uds_sink.width = window->width * input->width
 
                             struct v4l2_subdev_selection *sel)
 {
        struct vsp1_uif *uif = to_uif(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        int ret = 0;
 
 
        mutex_lock(&uif->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&uif->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&uif->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
        switch (sel->target) {
        case V4L2_SEL_TGT_CROP_BOUNDS:
        case V4L2_SEL_TGT_CROP_DEFAULT:
-               format = vsp1_entity_get_pad_format(&uif->entity, config,
+               format = vsp1_entity_get_pad_format(&uif->entity, state,
                                                    UIF_PAD_SINK);
                sel->r.left = 0;
                sel->r.top = 0;
                break;
 
        case V4L2_SEL_TGT_CROP:
-               sel->r = *vsp1_entity_get_pad_selection(&uif->entity, config,
+               sel->r = *vsp1_entity_get_pad_selection(&uif->entity, state,
                                                        sel->pad, sel->target);
                break;
 
                             struct v4l2_subdev_selection *sel)
 {
        struct vsp1_uif *uif = to_uif(subdev);
-       struct v4l2_subdev_state *config;
+       struct v4l2_subdev_state *state;
        struct v4l2_mbus_framefmt *format;
        struct v4l2_rect *selection;
        int ret = 0;
 
        mutex_lock(&uif->entity.lock);
 
-       config = vsp1_entity_get_pad_config(&uif->entity, sd_state,
-                                           sel->which);
-       if (!config) {
+       state = vsp1_entity_get_state(&uif->entity, sd_state, sel->which);
+       if (!state) {
                ret = -EINVAL;
                goto done;
        }
 
        /* The crop rectangle must be inside the input frame. */
-       format = vsp1_entity_get_pad_format(&uif->entity, config, UIF_PAD_SINK);
+       format = vsp1_entity_get_pad_format(&uif->entity, state, UIF_PAD_SINK);
 
        sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1);
        sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1);
                                format->height - sel->r.top);
 
        /* Store the crop rectangle. */
-       selection = vsp1_entity_get_pad_selection(&uif->entity, config,
+       selection = vsp1_entity_get_pad_selection(&uif->entity, state,
                                                  sel->pad, V4L2_SEL_TGT_CROP);
        *selection = sel->r;
 
        vsp1_uif_write(uif, dlb, VI6_UIF_DISCOM_DOCMPMR,
                       VI6_UIF_DISCOM_DOCMPMR_SEL(9));
 
-       crop = vsp1_entity_get_pad_selection(entity, entity->config,
+       crop = vsp1_entity_get_pad_selection(entity, entity->state,
                                             UIF_PAD_SINK, V4L2_SEL_TGT_CROP);
 
        left = crop->left;
 
         * at the WPF sink.
         */
        format = vsp1_entity_get_pad_format(&pipe->output->entity,
-                                           pipe->output->entity.config,
+                                           pipe->output->entity.state,
                                            RWPF_PAD_SINK);
 
        /* A single partition simply processes the output size in full. */
         * at the WPF sink.
         */
        format = vsp1_entity_get_pad_format(&pipe->output->entity,
-                                           pipe->output->entity.config,
+                                           pipe->output->entity.state,
                                            RWPF_PAD_SINK);
        div_size = format->width;
 
 
        }
 
        sink_format = vsp1_entity_get_pad_format(&wpf->entity,
-                                                wpf->entity.config,
+                                                wpf->entity.state,
                                                 RWPF_PAD_SINK);
        source_format = vsp1_entity_get_pad_format(&wpf->entity,
-                                                  wpf->entity.config,
+                                                  wpf->entity.state,
                                                   RWPF_PAD_SOURCE);
 
        mutex_lock(&wpf->entity.lock);
        int ret;
 
        sink_format = vsp1_entity_get_pad_format(&wpf->entity,
-                                                wpf->entity.config,
+                                                wpf->entity.state,
                                                 RWPF_PAD_SINK);
        source_format = vsp1_entity_get_pad_format(&wpf->entity,
-                                                  wpf->entity.config,
+                                                  wpf->entity.state,
                                                   RWPF_PAD_SOURCE);
 
        /* Format */
        unsigned int i;
 
        sink_format = vsp1_entity_get_pad_format(&wpf->entity,
-                                                wpf->entity.config,
+                                                wpf->entity.state,
                                                 RWPF_PAD_SINK);
        width = sink_format->width;
        height = sink_format->height;