From: Jani Nikula <jani.nikula@intel.com>
To: Daniel Vetter <daniel@ffwll.ch>
Cc: linux-fbdev@vger.kernel.org, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v3 04/12] video: fbdev: uvesafb: modify the static fb_ops directly
Date: Wed, 04 Dec 2019 06:31:06 +0000 [thread overview]
Message-ID: <87muc8haad.fsf@intel.com> (raw)
In-Reply-To: <20191203170351.GH624164@phenom.ffwll.local>
On Tue, 03 Dec 2019, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Tue, Dec 03, 2019 at 06:38:46PM +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/uvesafb.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c
>> index 439565cae7ab..53d08d1b56f5 100644
>> --- a/drivers/video/fbdev/uvesafb.c
>> +++ b/drivers/video/fbdev/uvesafb.c
>> @@ -1440,7 +1440,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
>>
>> /* Disable blanking if the user requested so. */
>> if (!blank)
>> - info->fbops->fb_blank = NULL;
>> + uvesafb_ops.fb_blank = NULL;
>>
>> /*
>> * Find out how much IO memory is required for the mode with
>> @@ -1510,7 +1510,7 @@ static void uvesafb_init_info(struct fb_info *info, struct vbe_mode_ib *mode)
>> (par->ypan ? FBINFO_HWACCEL_YPAN : 0);
>>
>> if (!par->ypan)
>> - info->fbops->fb_pan_display = NULL;
>> + uvesafb_ops.fb_pan_display = NULL;
>> }
>
> I read code.
>
> I cried.
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> Also, with more reading and more bad dreams I'll get about this, I'm
> revising my take on patches 1&2 in this series. On those also
>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
>
> as-is.
Thanks. I feel you.
And remember, all I ever wanted to do was
-static struct fb_ops intelfb_ops = {
+static const struct fb_ops intelfb_ops = {
in drivers/gpu/drm/i915/display/intel_fbdev.c.
BR,
Jani.
>
> Cheers, Daniel
>>
>> static void uvesafb_init_mtrr(struct fb_info *info)
>> --
>> 2.20.1
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2019-12-04 6:31 UTC|newest]
Thread overview: 34+ 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 ` [PATCH v3 01/12] video: fbdev: atyfb: modify the static fb_ops directly Jani Nikula
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:50 ` Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 03/12] video: fbdev: nvidia: " Jani Nikula
2019-12-03 16:54 ` [Intel-gfx] " Daniel Vetter
2019-12-03 16:38 ` [PATCH v3 04/12] video: fbdev: uvesafb: " Jani Nikula
2019-12-03 17:03 ` [Intel-gfx] " Daniel Vetter
2019-12-04 6:31 ` Jani Nikula [this message]
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-05 0:12 ` 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 ` [PATCH v3 07/12] video: fbdev: intelfb: use const pointer for fb_ops Jani Nikula
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-05 9:37 ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38 ` [PATCH v3 09/12] HID: picoLCD: constify fb ops Jani Nikula
2019-12-09 13:59 ` [Intel-gfx] " Jani Nikula
2019-12-03 16:38 ` [PATCH v3 10/12] media: constify fb ops across all drivers Jani Nikula
2019-12-04 11:33 ` Sakari Ailus
2019-12-05 9:40 ` Jani Nikula
2019-12-12 9:02 ` Hans Verkuil
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-09 14:01 ` Jani Nikula
2019-12-09 18:55 ` Kirti Wankhede
2019-12-10 6:53 ` Jani Nikula
2019-12-03 16:38 ` [PATCH v3 12/12] auxdisplay: " Jani Nikula
2019-12-09 14:03 ` Jani Nikula
2019-12-10 19:08 ` Miguel Ojeda
2019-12-11 11:11 ` Jani Nikula
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
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=87muc8haad.fsf@intel.com \
--to=jani.nikula@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).