From: Daniel Vetter Subject: Re: [PATCH 3/3] drm: Drop all the stub gamma_get, gamma_set, load_lut functions from drivers Date: Mon, 27 May 2013 20:40:22 +0200 Message-ID: <20130527184022.GS15743@phenom.ffwll.local> References: <1369675198-15194-1-git-send-email-ville.syrjala@linux.intel.com> <1369675198-15194-3-git-send-email-ville.syrjala@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ea0-f182.google.com (mail-ea0-f182.google.com [209.85.215.182]) by gabe.freedesktop.org (Postfix) with ESMTP id 86C62E5EEA for ; Mon, 27 May 2013 11:40:27 -0700 (PDT) Received: by mail-ea0-f182.google.com with SMTP id r16so3973506ead.27 for ; Mon, 27 May 2013 11:40:26 -0700 (PDT) Content-Disposition: inline In-Reply-To: <1369675198-15194-3-git-send-email-ville.syrjala@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: ville.syrjala@linux.intel.com Cc: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org On Mon, May 27, 2013 at 08:19:58PM +0300, ville.syrjala@linux.intel.com wro= te: > From: Ville Syrj=E4l=E4 > = > Many of the drivers didn't implement palette/gamma handling, but were for= ced > to provide stubs for the hooks to avoid drm_fb_helper from oopsing. Now t= hat > the hooks are optional, we can eliminate all the stubs. > = > Signed-off-by: Ville Syrj=E4l=E4 On the series: Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/exynos/exynos_drm_crtc.c | 7 ------- > drivers/gpu/drm/omapdrm/omap_crtc.c | 5 ----- > drivers/gpu/drm/omapdrm/omap_fbdev.c | 14 -------------- > drivers/gpu/drm/qxl/qxl_display.c | 13 ------------- > drivers/gpu/drm/qxl/qxl_fb.c | 4 ---- > drivers/gpu/drm/tilcdc/tilcdc_crtc.c | 5 ----- > drivers/gpu/drm/udl/udl_fb.c | 15 --------------- > drivers/gpu/drm/udl/udl_modeset.c | 5 ----- > drivers/staging/imx-drm/ipuv3-crtc.c | 5 ----- > 9 files changed, 73 deletions(-) > = > diff --git a/drivers/gpu/drm/exynos/exynos_drm_crtc.c b/drivers/gpu/drm/e= xynos/exynos_drm_crtc.c > index e8894bc..694d035 100644 > --- a/drivers/gpu/drm/exynos/exynos_drm_crtc.c > +++ b/drivers/gpu/drm/exynos/exynos_drm_crtc.c > @@ -160,12 +160,6 @@ static int exynos_drm_crtc_mode_set_base(struct drm_= crtc *crtc, int x, int y, > return 0; > } > = > -static void exynos_drm_crtc_load_lut(struct drm_crtc *crtc) > -{ > - DRM_DEBUG_KMS("%s\n", __FILE__); > - /* drm framework doesn't check NULL */ > -} > - > static void exynos_drm_crtc_disable(struct drm_crtc *crtc) > { > struct exynos_drm_crtc *exynos_crtc =3D to_exynos_crtc(crtc); > @@ -183,7 +177,6 @@ static struct drm_crtc_helper_funcs exynos_crtc_helpe= r_funcs =3D { > .mode_fixup =3D exynos_drm_crtc_mode_fixup, > .mode_set =3D exynos_drm_crtc_mode_set, > .mode_set_base =3D exynos_drm_crtc_mode_set_base, > - .load_lut =3D exynos_drm_crtc_load_lut, > .disable =3D exynos_drm_crtc_disable, > }; > = > diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdr= m/omap_crtc.c > index 79b200a..ef161ea 100644 > --- a/drivers/gpu/drm/omapdrm/omap_crtc.c > +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c > @@ -253,10 +253,6 @@ static int omap_crtc_mode_set_base(struct drm_crtc *= crtc, int x, int y, > NULL, NULL); > } > = > -static void omap_crtc_load_lut(struct drm_crtc *crtc) > -{ > -} > - > static void vblank_cb(void *arg) > { > struct drm_crtc *crtc =3D arg; > @@ -366,7 +362,6 @@ static const struct drm_crtc_helper_funcs omap_crtc_h= elper_funcs =3D { > .prepare =3D omap_crtc_prepare, > .commit =3D omap_crtc_commit, > .mode_set_base =3D omap_crtc_mode_set_base, > - .load_lut =3D omap_crtc_load_lut, > }; > = > const struct omap_video_timings *omap_crtc_timings(struct drm_crtc *crtc) > diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapd= rm/omap_fbdev.c > index b11ce60..002988d 100644 > --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c > +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c > @@ -281,21 +281,7 @@ fail: > return ret; > } > = > -static void omap_crtc_fb_gamma_set(struct drm_crtc *crtc, > - u16 red, u16 green, u16 blue, int regno) > -{ > - DBG("fbdev: set gamma"); > -} > - > -static void omap_crtc_fb_gamma_get(struct drm_crtc *crtc, > - u16 *red, u16 *green, u16 *blue, int regno) > -{ > - DBG("fbdev: get gamma"); > -} > - > static struct drm_fb_helper_funcs omap_fb_helper_funcs =3D { > - .gamma_set =3D omap_crtc_fb_gamma_set, > - .gamma_get =3D omap_crtc_fb_gamma_get, > .fb_probe =3D omap_fbdev_create, > }; > = > diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/gpu/drm/qxl/qxl_= display.c > index 823d29e..5a6bfa2 100644 > --- a/drivers/gpu/drm/qxl/qxl_display.c > +++ b/drivers/gpu/drm/qxl/qxl_display.c > @@ -222,12 +222,6 @@ static int qxl_add_common_modes(struct drm_connector= *connector) > return i - 1; > } > = > -static void qxl_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *gre= en, > - u16 *blue, uint32_t start, uint32_t size) > -{ > - /* TODO */ > -} > - > static void qxl_crtc_destroy(struct drm_crtc *crtc) > { > struct qxl_crtc *qxl_crtc =3D to_qxl_crtc(crtc); > @@ -399,7 +393,6 @@ static int qxl_crtc_cursor_move(struct drm_crtc *crtc, > static const struct drm_crtc_funcs qxl_crtc_funcs =3D { > .cursor_set =3D qxl_crtc_cursor_set, > .cursor_move =3D qxl_crtc_cursor_move, > - .gamma_set =3D qxl_crtc_gamma_set, > .set_config =3D drm_crtc_helper_set_config, > .destroy =3D qxl_crtc_destroy, > }; > @@ -619,18 +612,12 @@ static void qxl_crtc_commit(struct drm_crtc *crtc) > DRM_DEBUG("\n"); > } > = > -static void qxl_crtc_load_lut(struct drm_crtc *crtc) > -{ > - DRM_DEBUG("\n"); > -} > - > static const struct drm_crtc_helper_funcs qxl_crtc_helper_funcs =3D { > .dpms =3D qxl_crtc_dpms, > .mode_fixup =3D qxl_crtc_mode_fixup, > .mode_set =3D qxl_crtc_mode_set, > .prepare =3D qxl_crtc_prepare, > .commit =3D qxl_crtc_commit, > - .load_lut =3D qxl_crtc_load_lut, > }; > = > static int qdev_crtc_init(struct drm_device *dev, int num_crtc) > diff --git a/drivers/gpu/drm/qxl/qxl_fb.c b/drivers/gpu/drm/qxl/qxl_fb.c > index b3c5127..4b955b0 100644 > --- a/drivers/gpu/drm/qxl/qxl_fb.c > +++ b/drivers/gpu/drm/qxl/qxl_fb.c > @@ -520,10 +520,6 @@ static int qxl_fbdev_destroy(struct drm_device *dev,= struct qxl_fbdev *qfbdev) > } > = > static struct drm_fb_helper_funcs qxl_fb_helper_funcs =3D { > - /* TODO > - .gamma_set =3D qxl_crtc_fb_gamma_set, > - .gamma_get =3D qxl_crtc_fb_gamma_get, > - */ > .fb_probe =3D qxl_fb_find_or_create_single, > }; > = > diff --git a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c b/drivers/gpu/drm/tilcd= c/tilcdc_crtc.c > index 5dd3c7d..4de3fb4 100644 > --- a/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > +++ b/drivers/gpu/drm/tilcdc/tilcdc_crtc.c > @@ -384,10 +384,6 @@ static int tilcdc_crtc_mode_set_base(struct drm_crtc= *crtc, int x, int y, > return 0; > } > = > -static void tilcdc_crtc_load_lut(struct drm_crtc *crtc) > -{ > -} > - > static const struct drm_crtc_funcs tilcdc_crtc_funcs =3D { > .destroy =3D tilcdc_crtc_destroy, > .set_config =3D drm_crtc_helper_set_config, > @@ -401,7 +397,6 @@ static const struct drm_crtc_helper_funcs tilcdc_crtc= _helper_funcs =3D { > .commit =3D tilcdc_crtc_commit, > .mode_set =3D tilcdc_crtc_mode_set, > .mode_set_base =3D tilcdc_crtc_mode_set_base, > - .load_lut =3D tilcdc_crtc_load_lut, > }; > = > int tilcdc_crtc_max_width(struct drm_crtc *crtc) > diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c > index dc0c065..97e9d61 100644 > --- a/drivers/gpu/drm/udl/udl_fb.c > +++ b/drivers/gpu/drm/udl/udl_fb.c > @@ -393,19 +393,6 @@ static struct fb_ops udlfb_ops =3D { > .fb_release =3D udl_fb_release, > }; > = > -static void udl_crtc_fb_gamma_set(struct drm_crtc *crtc, u16 red, u16 gr= een, > - u16 blue, int regno) > -{ > -} > - > -static void udl_crtc_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *= green, > - u16 *blue, int regno) > -{ > - *red =3D 0; > - *green =3D 0; > - *blue =3D 0; > -} > - > static int udl_user_framebuffer_dirty(struct drm_framebuffer *fb, > struct drm_file *file, > unsigned flags, unsigned color, > @@ -558,8 +545,6 @@ out: > } > = > static struct drm_fb_helper_funcs udl_fb_helper_funcs =3D { > - .gamma_set =3D udl_crtc_fb_gamma_set, > - .gamma_get =3D udl_crtc_fb_gamma_get, > .fb_probe =3D udlfb_create, > }; > = > diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_= modeset.c > index e96d234..2ae1eb7 100644 > --- a/drivers/gpu/drm/udl/udl_modeset.c > +++ b/drivers/gpu/drm/udl/udl_modeset.c > @@ -363,10 +363,6 @@ static void udl_crtc_destroy(struct drm_crtc *crtc) > kfree(crtc); > } > = > -static void udl_load_lut(struct drm_crtc *crtc) > -{ > -} > - > static void udl_crtc_prepare(struct drm_crtc *crtc) > { > } > @@ -383,7 +379,6 @@ static struct drm_crtc_helper_funcs udl_helper_funcs = =3D { > .prepare =3D udl_crtc_prepare, > .commit =3D udl_crtc_commit, > .disable =3D udl_crtc_disable, > - .load_lut =3D udl_load_lut, > }; > = > static const struct drm_crtc_funcs udl_crtc_funcs =3D { > diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-d= rm/ipuv3-crtc.c > index ea61c86..374973d 100644 > --- a/drivers/staging/imx-drm/ipuv3-crtc.c > +++ b/drivers/staging/imx-drm/ipuv3-crtc.c > @@ -381,17 +381,12 @@ static void ipu_crtc_commit(struct drm_crtc *crtc) > ipu_fb_enable(ipu_crtc); > } > = > -static void ipu_crtc_load_lut(struct drm_crtc *crtc) > -{ > -} > - > static struct drm_crtc_helper_funcs ipu_helper_funcs =3D { > .dpms =3D ipu_crtc_dpms, > .mode_fixup =3D ipu_crtc_mode_fixup, > .mode_set =3D ipu_crtc_mode_set, > .prepare =3D ipu_crtc_prepare, > .commit =3D ipu_crtc_commit, > - .load_lut =3D ipu_crtc_load_lut, > }; > = > static int ipu_enable_vblank(struct drm_crtc *crtc) > -- = > 1.8.1.5 > = > _______________________________________________ > dri-devel mailing list > dri-devel@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/dri-devel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch