All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 01/12] video: fbdev: atyfb: modify the static fb_ops directly
Date: Tue, 03 Dec 2019 16:46:15 +0000	[thread overview]
Message-ID: <20191203164615.GE624164@phenom.ffwll.local> (raw)
In-Reply-To: <7dfbf1d47203157f5eb9a6f447f0095765d0b5e6.1575390740.git.jani.nikula@intel.com>

On Tue, Dec 03, 2019 at 06:38:43PM +0200, Jani Nikula wrote:
> Avoid modifying the fb_ops via info->fbops to let us make the pointer
> const in the future.
> 
> Cc: linux-fbdev@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/video/fbdev/aty/atyfb.h         | 2 +-
>  drivers/video/fbdev/aty/atyfb_base.c    | 6 +++---
>  drivers/video/fbdev/aty/mach64_cursor.c | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/video/fbdev/aty/atyfb.h b/drivers/video/fbdev/aty/atyfb.h
> index e5a347c58180..a7833bc98225 100644
> --- a/drivers/video/fbdev/aty/atyfb.h
> +++ b/drivers/video/fbdev/aty/atyfb.h
> @@ -341,7 +341,7 @@ extern const u8 aty_postdividers[8];
>       *  Hardware cursor support
>       */
>  
> -extern int aty_init_cursor(struct fb_info *info);
> +extern int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops);
>  
>      /*
>       *  Hardware acceleration
> diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
> index 6dda5d885a03..bebc08505d94 100644
> --- a/drivers/video/fbdev/aty/atyfb_base.c
> +++ b/drivers/video/fbdev/aty/atyfb_base.c
> @@ -1316,10 +1316,10 @@ static int atyfb_set_par(struct fb_info *info)
>  	par->accel_flags = var->accel_flags; /* hack */
>  
>  	if (var->accel_flags) {
> -		info->fbops->fb_sync = atyfb_sync;
> +		atyfb_ops.fb_sync = atyfb_sync;
>  		info->flags &= ~FBINFO_HWACCEL_DISABLED;
>  	} else {
> -		info->fbops->fb_sync = NULL;
> +		atyfb_ops.fb_sync = NULL;
>  		info->flags |= FBINFO_HWACCEL_DISABLED;
>  	}
>  
> @@ -2702,7 +2702,7 @@ static int aty_init(struct fb_info *info)
>  
>  #ifdef CONFIG_FB_ATY_CT
>  	if (!noaccel && M64_HAS(INTEGRATED))
> -		aty_init_cursor(info);
> +		aty_init_cursor(info, &atyfb_ops);

Uh ... can I bikeshed this to duplicating an atyfb_cursor_ops and then
just reassigning the info->fbops pointer?

This here seems a bit too wild.
-Daniel

>  #endif /* CONFIG_FB_ATY_CT */
>  	info->var = var;
>  
> diff --git a/drivers/video/fbdev/aty/mach64_cursor.c b/drivers/video/fbdev/aty/mach64_cursor.c
> index 4cde25eab8e8..b06fa6e42e6e 100644
> --- a/drivers/video/fbdev/aty/mach64_cursor.c
> +++ b/drivers/video/fbdev/aty/mach64_cursor.c
> @@ -194,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
>  	return 0;
>  }
>  
> -int aty_init_cursor(struct fb_info *info)
> +int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops)
>  {
>  	unsigned long addr;
>  
> @@ -219,7 +219,7 @@ int aty_init_cursor(struct fb_info *info)
>  	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
>  	info->sprite.flags = FB_PIXMAP_IO;
>  
> -	info->fbops->fb_cursor = atyfb_cursor;
> +	atyfb_ops->fb_cursor = atyfb_cursor;
>  
>  	return 0;
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v3 01/12] video: fbdev: atyfb: modify the static fb_ops directly
Date: Tue, 3 Dec 2019 17:46:15 +0100	[thread overview]
Message-ID: <20191203164615.GE624164@phenom.ffwll.local> (raw)
In-Reply-To: <7dfbf1d47203157f5eb9a6f447f0095765d0b5e6.1575390740.git.jani.nikula@intel.com>

On Tue, Dec 03, 2019 at 06:38:43PM +0200, Jani Nikula wrote:
> Avoid modifying the fb_ops via info->fbops to let us make the pointer
> const in the future.
> 
> Cc: linux-fbdev@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/video/fbdev/aty/atyfb.h         | 2 +-
>  drivers/video/fbdev/aty/atyfb_base.c    | 6 +++---
>  drivers/video/fbdev/aty/mach64_cursor.c | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/video/fbdev/aty/atyfb.h b/drivers/video/fbdev/aty/atyfb.h
> index e5a347c58180..a7833bc98225 100644
> --- a/drivers/video/fbdev/aty/atyfb.h
> +++ b/drivers/video/fbdev/aty/atyfb.h
> @@ -341,7 +341,7 @@ extern const u8 aty_postdividers[8];
>       *  Hardware cursor support
>       */
>  
> -extern int aty_init_cursor(struct fb_info *info);
> +extern int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops);
>  
>      /*
>       *  Hardware acceleration
> diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
> index 6dda5d885a03..bebc08505d94 100644
> --- a/drivers/video/fbdev/aty/atyfb_base.c
> +++ b/drivers/video/fbdev/aty/atyfb_base.c
> @@ -1316,10 +1316,10 @@ static int atyfb_set_par(struct fb_info *info)
>  	par->accel_flags = var->accel_flags; /* hack */
>  
>  	if (var->accel_flags) {
> -		info->fbops->fb_sync = atyfb_sync;
> +		atyfb_ops.fb_sync = atyfb_sync;
>  		info->flags &= ~FBINFO_HWACCEL_DISABLED;
>  	} else {
> -		info->fbops->fb_sync = NULL;
> +		atyfb_ops.fb_sync = NULL;
>  		info->flags |= FBINFO_HWACCEL_DISABLED;
>  	}
>  
> @@ -2702,7 +2702,7 @@ static int aty_init(struct fb_info *info)
>  
>  #ifdef CONFIG_FB_ATY_CT
>  	if (!noaccel && M64_HAS(INTEGRATED))
> -		aty_init_cursor(info);
> +		aty_init_cursor(info, &atyfb_ops);

Uh ... can I bikeshed this to duplicating an atyfb_cursor_ops and then
just reassigning the info->fbops pointer?

This here seems a bit too wild.
-Daniel

>  #endif /* CONFIG_FB_ATY_CT */
>  	info->var = var;
>  
> diff --git a/drivers/video/fbdev/aty/mach64_cursor.c b/drivers/video/fbdev/aty/mach64_cursor.c
> index 4cde25eab8e8..b06fa6e42e6e 100644
> --- a/drivers/video/fbdev/aty/mach64_cursor.c
> +++ b/drivers/video/fbdev/aty/mach64_cursor.c
> @@ -194,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
>  	return 0;
>  }
>  
> -int aty_init_cursor(struct fb_info *info)
> +int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops)
>  {
>  	unsigned long addr;
>  
> @@ -219,7 +219,7 @@ int aty_init_cursor(struct fb_info *info)
>  	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
>  	info->sprite.flags = FB_PIXMAP_IO;
>  
> -	info->fbops->fb_cursor = atyfb_cursor;
> +	atyfb_ops->fb_cursor = atyfb_cursor;
>  
>  	return 0;
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Jani Nikula <jani.nikula@intel.com>
Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 01/12] video: fbdev: atyfb: modify the static fb_ops directly
Date: Tue, 3 Dec 2019 17:46:15 +0100	[thread overview]
Message-ID: <20191203164615.GE624164@phenom.ffwll.local> (raw)
In-Reply-To: <7dfbf1d47203157f5eb9a6f447f0095765d0b5e6.1575390740.git.jani.nikula@intel.com>

On Tue, Dec 03, 2019 at 06:38:43PM +0200, Jani Nikula wrote:
> Avoid modifying the fb_ops via info->fbops to let us make the pointer
> const in the future.
> 
> Cc: linux-fbdev@vger.kernel.org
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
>  drivers/video/fbdev/aty/atyfb.h         | 2 +-
>  drivers/video/fbdev/aty/atyfb_base.c    | 6 +++---
>  drivers/video/fbdev/aty/mach64_cursor.c | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/video/fbdev/aty/atyfb.h b/drivers/video/fbdev/aty/atyfb.h
> index e5a347c58180..a7833bc98225 100644
> --- a/drivers/video/fbdev/aty/atyfb.h
> +++ b/drivers/video/fbdev/aty/atyfb.h
> @@ -341,7 +341,7 @@ extern const u8 aty_postdividers[8];
>       *  Hardware cursor support
>       */
>  
> -extern int aty_init_cursor(struct fb_info *info);
> +extern int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops);
>  
>      /*
>       *  Hardware acceleration
> diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
> index 6dda5d885a03..bebc08505d94 100644
> --- a/drivers/video/fbdev/aty/atyfb_base.c
> +++ b/drivers/video/fbdev/aty/atyfb_base.c
> @@ -1316,10 +1316,10 @@ static int atyfb_set_par(struct fb_info *info)
>  	par->accel_flags = var->accel_flags; /* hack */
>  
>  	if (var->accel_flags) {
> -		info->fbops->fb_sync = atyfb_sync;
> +		atyfb_ops.fb_sync = atyfb_sync;
>  		info->flags &= ~FBINFO_HWACCEL_DISABLED;
>  	} else {
> -		info->fbops->fb_sync = NULL;
> +		atyfb_ops.fb_sync = NULL;
>  		info->flags |= FBINFO_HWACCEL_DISABLED;
>  	}
>  
> @@ -2702,7 +2702,7 @@ static int aty_init(struct fb_info *info)
>  
>  #ifdef CONFIG_FB_ATY_CT
>  	if (!noaccel && M64_HAS(INTEGRATED))
> -		aty_init_cursor(info);
> +		aty_init_cursor(info, &atyfb_ops);

Uh ... can I bikeshed this to duplicating an atyfb_cursor_ops and then
just reassigning the info->fbops pointer?

This here seems a bit too wild.
-Daniel

>  #endif /* CONFIG_FB_ATY_CT */
>  	info->var = var;
>  
> diff --git a/drivers/video/fbdev/aty/mach64_cursor.c b/drivers/video/fbdev/aty/mach64_cursor.c
> index 4cde25eab8e8..b06fa6e42e6e 100644
> --- a/drivers/video/fbdev/aty/mach64_cursor.c
> +++ b/drivers/video/fbdev/aty/mach64_cursor.c
> @@ -194,7 +194,7 @@ static int atyfb_cursor(struct fb_info *info, struct fb_cursor *cursor)
>  	return 0;
>  }
>  
> -int aty_init_cursor(struct fb_info *info)
> +int aty_init_cursor(struct fb_info *info, struct fb_ops *atyfb_ops)
>  {
>  	unsigned long addr;
>  
> @@ -219,7 +219,7 @@ int aty_init_cursor(struct fb_info *info)
>  	info->sprite.buf_align = 16; 	/* and 64 lines tall. */
>  	info->sprite.flags = FB_PIXMAP_IO;
>  
> -	info->fbops->fb_cursor = atyfb_cursor;
> +	atyfb_ops->fb_cursor = atyfb_cursor;
>  
>  	return 0;
>  }
> -- 
> 2.20.1
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-12-03 16:46 UTC|newest]

Thread overview: 121+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-03 16:38 [PATCH v3 00/12] video, drm, etc: constify fbops in struct fb_info Jani Nikula
2019-12-03 16:38 ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38 ` Jani Nikula
2019-12-03 16:38 ` Jani Nikula
2019-12-03 16:38 ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 01/12] video: fbdev: atyfb: modify the static fb_ops directly Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:46   ` Daniel Vetter [this message]
2019-12-03 16:46     ` [Intel-gfx] " Daniel Vetter
2019-12-03 16:46     ` Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 02/12] video: fbdev: mb862xx: " Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:50   ` Daniel Vetter
2019-12-03 16:50     ` [Intel-gfx] " Daniel Vetter
2019-12-03 16:50     ` Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 03/12] video: fbdev: nvidia: " Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:54   ` [Intel-gfx] " Daniel Vetter
2019-12-03 16:54     ` Daniel Vetter
2019-12-03 16:54     ` Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 04/12] video: fbdev: uvesafb: " Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 17:03   ` [Intel-gfx] " Daniel Vetter
2019-12-03 17:03     ` Daniel Vetter
2019-12-03 17:03     ` Daniel Vetter
2019-12-04  6:31     ` Jani Nikula
2019-12-04  6:31       ` Jani Nikula
2019-12-04  6:31       ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 05/12] video: fbdev: make fbops member of struct fb_info a const pointer Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-05  0:12   ` kbuild test robot
2019-12-05  0:12     ` kbuild test robot
2019-12-05  0:12     ` [Intel-gfx] " kbuild test robot
2019-12-05  0:12     ` kbuild test robot
2019-12-05 22:25   ` kbuild test robot
2019-12-03 16:38 ` [PATCH v3 06/12] drm: constify fb ops across all drivers Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 07/12] video: fbdev: intelfb: use const pointer for fb_ops Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 17:09   ` Daniel Vetter
2019-12-03 17:09     ` [Intel-gfx] " Daniel Vetter
2019-12-03 17:09     ` Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 08/12] video: constify fb ops across all drivers Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-05  9:37   ` [Intel-gfx] " Jani Nikula
2019-12-05  9:37     ` Jani Nikula
2019-12-05  9:37     ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 09/12] HID: picoLCD: constify fb ops Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-09 13:59   ` [Intel-gfx] " Jani Nikula
2019-12-09 13:59     ` Jani Nikula
2019-12-09 13:59     ` Jani Nikula
2019-12-09 13:59     ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 10/12] media: constify fb ops across all drivers Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-04 11:33   ` Sakari Ailus
2019-12-04 11:33     ` [Intel-gfx] " Sakari Ailus
2019-12-04 11:33     ` Sakari Ailus
2019-12-04 11:33     ` Sakari Ailus
2019-12-05  9:40     ` Jani Nikula
2019-12-05  9:40       ` [Intel-gfx] " Jani Nikula
2019-12-05  9:40       ` Jani Nikula
2019-12-05  9:40       ` Jani Nikula
2019-12-12  9:02   ` Hans Verkuil
2019-12-12  9:02     ` [Intel-gfx] " Hans Verkuil
2019-12-12  9:02     ` Hans Verkuil
2019-12-12  9:02     ` Hans Verkuil
2019-12-13 10:41     ` Jani Nikula
2019-12-13 10:41       ` [Intel-gfx] " Jani Nikula
2019-12-13 10:41       ` Jani Nikula
2019-12-13 10:41       ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 11/12] samples: vfio-mdev: constify fb ops Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-09 14:01   ` Jani Nikula
2019-12-09 14:01     ` [Intel-gfx] " Jani Nikula
2019-12-09 14:01     ` Jani Nikula
2019-12-09 14:01     ` Jani Nikula
2019-12-09 18:43     ` Kirti Wankhede
2019-12-09 18:55       ` Kirti Wankhede
2019-12-09 18:43       ` [Intel-gfx] " Kirti Wankhede
2019-12-09 18:43       ` Kirti Wankhede
2019-12-10  6:53       ` Jani Nikula
2019-12-10  6:53         ` [Intel-gfx] " Jani Nikula
2019-12-10  6:53         ` Jani Nikula
2019-12-10  6:53         ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 12/12] auxdisplay: " Jani Nikula
2019-12-03 16:38   ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38   ` Jani Nikula
2019-12-09 14:03   ` Jani Nikula
2019-12-09 14:03     ` [Intel-gfx] " Jani Nikula
2019-12-09 14:03     ` Jani Nikula
2019-12-10 19:08     ` Miguel Ojeda
2019-12-10 19:08       ` Miguel Ojeda
2019-12-11 11:11       ` Jani Nikula
2019-12-11 11:11         ` [Intel-gfx] " Jani Nikula
2019-12-11 11:11         ` Jani Nikula
2019-12-11  8:35     ` robin
2019-12-11  8:35       ` [Intel-gfx] " robin
2019-12-11  8:35       ` robin
2019-12-03 16:42 ` [Intel-gfx] [PATCH v3 00/12] video, drm, etc: constify fbops in struct fb_info Jani Nikula
2019-12-03 16:42   ` Jani Nikula
2019-12-03 16:42   ` Jani Nikula
2019-12-03 16:42   ` Jani Nikula
2019-12-03 16:42   ` [Intel-gfx] " Jani Nikula
2019-12-03 19:50 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for video, drm, etc: constify fbops in struct fb_info (rev2) Patchwork
2019-12-03 20:12 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-04  5:41 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191203164615.GE624164@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=linux-fbdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.