Message ID | 851b8504c7f294a10645ba6f6d391ac9764068b7.1492768073.git.jsarha@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Jyri, Thank you for the patch. On Friday 21 Apr 2017 12:51:13 Jyri Sarha wrote: > Change drm_atomic_replace_property_blob_from_id()'s first parameter > from drm_crtc to drm_device, so that the function can be used for other > drm_mode_objects too. > > Signed-off-by: Jyri Sarha <jsarha@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/drm_atomic.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > index 9b892af..f881319 100644 > --- a/drivers/gpu/drm/drm_atomic.c > +++ b/drivers/gpu/drm/drm_atomic.c > @@ -425,7 +425,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct > drm_crtc_state *state, } > > static int > -drm_atomic_replace_property_blob_from_id(struct drm_crtc *crtc, > +drm_atomic_replace_property_blob_from_id(struct drm_device *dev, > struct drm_property_blob **blob, > uint64_t blob_id, > ssize_t expected_size, > @@ -434,7 +434,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct > drm_crtc_state *state, struct drm_property_blob *new_blob = NULL; > > if (blob_id != 0) { > - new_blob = drm_property_lookup_blob(crtc->dev, blob_id); > + new_blob = drm_property_lookup_blob(dev, blob_id); > if (new_blob == NULL) > return -EINVAL; > > @@ -483,7 +483,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > drm_property_blob_put(mode); > return ret; > } else if (property == config->degamma_lut_property) { > - ret = drm_atomic_replace_property_blob_from_id(crtc, > + ret = drm_atomic_replace_property_blob_from_id(dev, > &state->degamma_lut, > val, > -1, > @@ -491,7 +491,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > state->color_mgmt_changed |= replaced; > return ret; > } else if (property == config->ctm_property) { > - ret = drm_atomic_replace_property_blob_from_id(crtc, > + ret = drm_atomic_replace_property_blob_from_id(dev, > &state->ctm, > val, > sizeof(struct drm_color_ctm), > @@ -499,7 +499,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > state->color_mgmt_changed |= replaced; > return ret; > } else if (property == config->gamma_lut_property) { > - ret = drm_atomic_replace_property_blob_from_id(crtc, > + ret = drm_atomic_replace_property_blob_from_id(dev, > &state->gamma_lut, > val, > -1,
On Fri, Apr 21, 2017 at 02:47:44PM +0300, Laurent Pinchart wrote: > Hi Jyri, > > Thank you for the patch. > > On Friday 21 Apr 2017 12:51:13 Jyri Sarha wrote: > > Change drm_atomic_replace_property_blob_from_id()'s first parameter > > from drm_crtc to drm_device, so that the function can be used for other > > drm_mode_objects too. > > > > Signed-off-by: Jyri Sarha <jsarha@ti.com> > > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> First two patches applied for 4.13, thanks. -Daniel > > > --- > > drivers/gpu/drm/drm_atomic.c | 10 +++++----- > > 1 file changed, 5 insertions(+), 5 deletions(-) > > > > diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c > > index 9b892af..f881319 100644 > > --- a/drivers/gpu/drm/drm_atomic.c > > +++ b/drivers/gpu/drm/drm_atomic.c > > @@ -425,7 +425,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct > > drm_crtc_state *state, } > > > > static int > > -drm_atomic_replace_property_blob_from_id(struct drm_crtc *crtc, > > +drm_atomic_replace_property_blob_from_id(struct drm_device *dev, > > struct drm_property_blob **blob, > > uint64_t blob_id, > > ssize_t expected_size, > > @@ -434,7 +434,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct > > drm_crtc_state *state, struct drm_property_blob *new_blob = NULL; > > > > if (blob_id != 0) { > > - new_blob = drm_property_lookup_blob(crtc->dev, blob_id); > > + new_blob = drm_property_lookup_blob(dev, blob_id); > > if (new_blob == NULL) > > return -EINVAL; > > > > @@ -483,7 +483,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > > drm_property_blob_put(mode); > > return ret; > > } else if (property == config->degamma_lut_property) { > > - ret = drm_atomic_replace_property_blob_from_id(crtc, > > + ret = drm_atomic_replace_property_blob_from_id(dev, > > &state->degamma_lut, > > val, > > -1, > > @@ -491,7 +491,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > > state->color_mgmt_changed |= replaced; > > return ret; > > } else if (property == config->ctm_property) { > > - ret = drm_atomic_replace_property_blob_from_id(crtc, > > + ret = drm_atomic_replace_property_blob_from_id(dev, > > &state->ctm, > > val, > > sizeof(struct drm_color_ctm), > > @@ -499,7 +499,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, > > state->color_mgmt_changed |= replaced; > > return ret; > > } else if (property == config->gamma_lut_property) { > > - ret = drm_atomic_replace_property_blob_from_id(crtc, > > + ret = drm_atomic_replace_property_blob_from_id(dev, > > &state->gamma_lut, > > val, > > -1, > > -- > Regards, > > Laurent Pinchart >
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 9b892af..f881319 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -425,7 +425,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, } static int -drm_atomic_replace_property_blob_from_id(struct drm_crtc *crtc, +drm_atomic_replace_property_blob_from_id(struct drm_device *dev, struct drm_property_blob **blob, uint64_t blob_id, ssize_t expected_size, @@ -434,7 +434,7 @@ int drm_atomic_set_mode_prop_for_crtc(struct drm_crtc_state *state, struct drm_property_blob *new_blob = NULL; if (blob_id != 0) { - new_blob = drm_property_lookup_blob(crtc->dev, blob_id); + new_blob = drm_property_lookup_blob(dev, blob_id); if (new_blob == NULL) return -EINVAL; @@ -483,7 +483,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, drm_property_blob_put(mode); return ret; } else if (property == config->degamma_lut_property) { - ret = drm_atomic_replace_property_blob_from_id(crtc, + ret = drm_atomic_replace_property_blob_from_id(dev, &state->degamma_lut, val, -1, @@ -491,7 +491,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, state->color_mgmt_changed |= replaced; return ret; } else if (property == config->ctm_property) { - ret = drm_atomic_replace_property_blob_from_id(crtc, + ret = drm_atomic_replace_property_blob_from_id(dev, &state->ctm, val, sizeof(struct drm_color_ctm), @@ -499,7 +499,7 @@ int drm_atomic_crtc_set_property(struct drm_crtc *crtc, state->color_mgmt_changed |= replaced; return ret; } else if (property == config->gamma_lut_property) { - ret = drm_atomic_replace_property_blob_from_id(crtc, + ret = drm_atomic_replace_property_blob_from_id(dev, &state->gamma_lut, val, -1,
Change drm_atomic_replace_property_blob_from_id()'s first parameter from drm_crtc to drm_device, so that the function can be used for other drm_mode_objects too. Signed-off-by: Jyri Sarha <jsarha@ti.com> --- drivers/gpu/drm/drm_atomic.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)