diff mbox series

[01/16] drm/fb-helper: Remove unused gamma_size variable

Message ID 20190326175546.18126-2-noralf@tronnes.org (mailing list archive)
State New, archived
Headers show
Series drm/fb-helper: Move modesetting code to drm_client | expand

Commit Message

Noralf Trønnes March 26, 2019, 5:55 p.m. UTC
The gamma_size variable has not been used since
commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug also.")

While in the area move a comment back to its code block.
They got separated by
commit d50ba256b5f1 ("drm/kms: start adding command line interface using fb.").

Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
---
 drivers/gpu/drm/drm_fb_helper.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

Comments

Daniel Vetter March 26, 2019, 6:23 p.m. UTC | #1
On Tue, Mar 26, 2019 at 06:55:31PM +0100, Noralf Trønnes wrote:
> The gamma_size variable has not been used since
> commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug also.")
> 
> While in the area move a comment back to its code block.
> They got separated by
> commit d50ba256b5f1 ("drm/kms: start adding command line interface using fb.").
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/drm_fb_helper.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 04d23cb430bf..eea15465da7a 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1873,7 +1873,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  	int crtc_count = 0;
>  	int i;
>  	struct drm_fb_helper_surface_size sizes;
> -	int gamma_size = 0;
>  	int best_depth = 0;
>  
>  	memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size));
> @@ -1889,7 +1888,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  	if (preferred_bpp != sizes.surface_bpp)
>  		sizes.surface_depth = sizes.surface_bpp = preferred_bpp;
>  
> -	/* first up get a count of crtcs now in use and new min/maxes width/heights */
>  	drm_fb_helper_for_each_connector(fb_helper, i) {
>  		struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i];
>  		struct drm_cmdline_mode *cmdline_mode;
> @@ -1969,6 +1967,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  		sizes.surface_depth = best_depth;
>  	}
>  
> +	/* first up get a count of crtcs now in use and new min/maxes width/heights */
>  	crtc_count = 0;
>  	for (i = 0; i < fb_helper->crtc_count; i++) {
>  		struct drm_display_mode *desired_mode;
> @@ -1991,9 +1990,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>  		x = fb_helper->crtc_info[i].x;
>  		y = fb_helper->crtc_info[i].y;
>  
> -		if (gamma_size == 0)
> -			gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size;
> -
>  		sizes.surface_width  = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width);
>  		sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height);
>  
> -- 
> 2.20.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Noralf Trønnes April 3, 2019, 9:19 a.m. UTC | #2
Den 26.03.2019 19.23, skrev Daniel Vetter:
> On Tue, Mar 26, 2019 at 06:55:31PM +0100, Noralf Trønnes wrote:
>> The gamma_size variable has not been used since
>> commit 4abe35204af8 ("drm/kms/fb: use slow work mechanism for normal hotplug also.")
>>
>> While in the area move a comment back to its code block.
>> They got separated by
>> commit d50ba256b5f1 ("drm/kms: start adding command line interface using fb.").
>>
>> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> 
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Thanks, patches 1 & 2 applied to drm-misc-next.

Noralf.

> 
>> ---
>>  drivers/gpu/drm/drm_fb_helper.c | 6 +-----
>>  1 file changed, 1 insertion(+), 5 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
>> index 04d23cb430bf..eea15465da7a 100644
>> --- a/drivers/gpu/drm/drm_fb_helper.c
>> +++ b/drivers/gpu/drm/drm_fb_helper.c
>> @@ -1873,7 +1873,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>>  	int crtc_count = 0;
>>  	int i;
>>  	struct drm_fb_helper_surface_size sizes;
>> -	int gamma_size = 0;
>>  	int best_depth = 0;
>>  
>>  	memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size));
>> @@ -1889,7 +1888,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>>  	if (preferred_bpp != sizes.surface_bpp)
>>  		sizes.surface_depth = sizes.surface_bpp = preferred_bpp;
>>  
>> -	/* first up get a count of crtcs now in use and new min/maxes width/heights */
>>  	drm_fb_helper_for_each_connector(fb_helper, i) {
>>  		struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i];
>>  		struct drm_cmdline_mode *cmdline_mode;
>> @@ -1969,6 +1967,7 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>>  		sizes.surface_depth = best_depth;
>>  	}
>>  
>> +	/* first up get a count of crtcs now in use and new min/maxes width/heights */
>>  	crtc_count = 0;
>>  	for (i = 0; i < fb_helper->crtc_count; i++) {
>>  		struct drm_display_mode *desired_mode;
>> @@ -1991,9 +1990,6 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>>  		x = fb_helper->crtc_info[i].x;
>>  		y = fb_helper->crtc_info[i].y;
>>  
>> -		if (gamma_size == 0)
>> -			gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size;
>> -
>>  		sizes.surface_width  = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width);
>>  		sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height);
>>  
>> -- 
>> 2.20.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
index 04d23cb430bf..eea15465da7a 100644
--- a/drivers/gpu/drm/drm_fb_helper.c
+++ b/drivers/gpu/drm/drm_fb_helper.c
@@ -1873,7 +1873,6 @@  static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 	int crtc_count = 0;
 	int i;
 	struct drm_fb_helper_surface_size sizes;
-	int gamma_size = 0;
 	int best_depth = 0;
 
 	memset(&sizes, 0, sizeof(struct drm_fb_helper_surface_size));
@@ -1889,7 +1888,6 @@  static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 	if (preferred_bpp != sizes.surface_bpp)
 		sizes.surface_depth = sizes.surface_bpp = preferred_bpp;
 
-	/* first up get a count of crtcs now in use and new min/maxes width/heights */
 	drm_fb_helper_for_each_connector(fb_helper, i) {
 		struct drm_fb_helper_connector *fb_helper_conn = fb_helper->connector_info[i];
 		struct drm_cmdline_mode *cmdline_mode;
@@ -1969,6 +1967,7 @@  static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 		sizes.surface_depth = best_depth;
 	}
 
+	/* first up get a count of crtcs now in use and new min/maxes width/heights */
 	crtc_count = 0;
 	for (i = 0; i < fb_helper->crtc_count; i++) {
 		struct drm_display_mode *desired_mode;
@@ -1991,9 +1990,6 @@  static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
 		x = fb_helper->crtc_info[i].x;
 		y = fb_helper->crtc_info[i].y;
 
-		if (gamma_size == 0)
-			gamma_size = fb_helper->crtc_info[i].mode_set.crtc->gamma_size;
-
 		sizes.surface_width  = max_t(u32, desired_mode->hdisplay + x, sizes.surface_width);
 		sizes.surface_height = max_t(u32, desired_mode->vdisplay + y, sizes.surface_height);