From: Javier Martinez Canillas <javierm@redhat.com> To: Thomas Zimmermann <tzimmermann@suse.de>, daniel@ffwll.ch, airlied@linux.ie, mripard@kernel.org, maarten.lankhorst@linux.intel.com, deller@gmx.de Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Subject: Re: [PATCH 8/9] drm/gem-shmem: Implement fbdev dumb buffer and mmap helpers Date: Wed, 9 Mar 2022 12:25:32 +0100 [thread overview] Message-ID: <c3513c35-57a3-64e1-b3a6-0878cc61af6a@redhat.com> (raw) In-Reply-To: <22b9e772-8823-0af1-037a-621844e7c810@suse.de> On 3/9/22 09:47, Thomas Zimmermann wrote: [snip] >>> >>> +static const struct drm_gem_object_funcs drm_gem_shmem_funcs_fbdev = { >>> + .free = drm_gem_shmem_object_free, >>> + .print_info = drm_gem_shmem_object_print_info, >>> + .pin = drm_gem_shmem_object_pin, >>> + .unpin = drm_gem_shmem_object_unpin, >>> + .get_sg_table = drm_gem_shmem_object_get_sg_table, >>> + .vmap = drm_gem_shmem_object_vmap, >>> + .vunmap = drm_gem_shmem_object_vunmap, >>> + .mmap = drm_gem_shmem_object_mmap_fbdev, >>> + .vm_ops = &drm_gem_shmem_vm_ops_fbdev, >> >> The drm_gem_shmem_funcs_fbdev is the same than drm_gem_shmem_funcs but >> .mmap and .vm_ops callbacks. Maybe adding a macro to declare these two >> struct drm_gem_object_funcs could make easier to maintain it long term ? > > I see you point, but I'm undecided about this. Such macros also add some > amount of obfuscation. I'm not sure if it's worth it for an internal > constant. And since the fbdev buffer is never exported, we could remove > some of the callbacks. AFAICT we never call pin, unpin or get_sg_table. > Yeah, that's true too. It was just a suggestion, I'm OK with patch as is. > Best regards > Thomas > >> -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat
WARNING: multiple messages have this Message-ID (diff)
From: Javier Martinez Canillas <javierm@redhat.com> To: Thomas Zimmermann <tzimmermann@suse.de>, daniel@ffwll.ch, airlied@linux.ie, mripard@kernel.org, maarten.lankhorst@linux.intel.com, deller@gmx.de Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 8/9] drm/gem-shmem: Implement fbdev dumb buffer and mmap helpers Date: Wed, 9 Mar 2022 12:25:32 +0100 [thread overview] Message-ID: <c3513c35-57a3-64e1-b3a6-0878cc61af6a@redhat.com> (raw) In-Reply-To: <22b9e772-8823-0af1-037a-621844e7c810@suse.de> On 3/9/22 09:47, Thomas Zimmermann wrote: [snip] >>> >>> +static const struct drm_gem_object_funcs drm_gem_shmem_funcs_fbdev = { >>> + .free = drm_gem_shmem_object_free, >>> + .print_info = drm_gem_shmem_object_print_info, >>> + .pin = drm_gem_shmem_object_pin, >>> + .unpin = drm_gem_shmem_object_unpin, >>> + .get_sg_table = drm_gem_shmem_object_get_sg_table, >>> + .vmap = drm_gem_shmem_object_vmap, >>> + .vunmap = drm_gem_shmem_object_vunmap, >>> + .mmap = drm_gem_shmem_object_mmap_fbdev, >>> + .vm_ops = &drm_gem_shmem_vm_ops_fbdev, >> >> The drm_gem_shmem_funcs_fbdev is the same than drm_gem_shmem_funcs but >> .mmap and .vm_ops callbacks. Maybe adding a macro to declare these two >> struct drm_gem_object_funcs could make easier to maintain it long term ? > > I see you point, but I'm undecided about this. Such macros also add some > amount of obfuscation. I'm not sure if it's worth it for an internal > constant. And since the fbdev buffer is never exported, we could remove > some of the callbacks. AFAICT we never call pin, unpin or get_sg_table. > Yeah, that's true too. It was just a suggestion, I'm OK with patch as is. > Best regards > Thomas > >> -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat
next prev parent reply other threads:[~2022-03-09 11:25 UTC|newest] Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-03 20:58 [PATCH 0/9] drm: Support GEM SHMEM fbdev without shadow FB Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-03 20:58 ` [PATCH 1/9] drm/simpledrm: Use fbdev defaults for shadow buffering Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 9:31 ` Javier Martinez Canillas 2022-03-08 9:31 ` Javier Martinez Canillas 2022-03-08 9:56 ` Thomas Zimmermann 2022-03-08 9:56 ` Thomas Zimmermann 2022-03-08 9:58 ` Javier Martinez Canillas 2022-03-08 9:58 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 2/9] fbdev: Put mmap for deferred I/O into drivers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 14:03 ` Javier Martinez Canillas 2022-03-08 14:03 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 3/9] fbdev: Track deferred-I/O pages in pageref struct Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 14:42 ` Javier Martinez Canillas 2022-03-08 14:42 ` Javier Martinez Canillas 2022-03-09 8:36 ` Thomas Zimmermann 2022-03-09 8:36 ` Thomas Zimmermann 2022-03-09 11:21 ` Javier Martinez Canillas 2022-03-09 11:21 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 4/9] fbdev: Export helper for implementing page_mkwrite Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 17:21 ` Javier Martinez Canillas 2022-03-08 17:21 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 5/9] drm/fb-helper: Separate deferred I/O from shadow buffers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 17:24 ` Javier Martinez Canillas 2022-03-08 17:24 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 6/9] drm/fb-helper: Provide callback to create fbdev dumb buffers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 17:51 ` Javier Martinez Canillas 2022-03-08 17:51 ` Javier Martinez Canillas 2022-03-09 8:42 ` Thomas Zimmermann 2022-03-09 8:42 ` Thomas Zimmermann 2022-03-15 19:11 ` Thomas Zimmermann 2022-03-15 19:11 ` Thomas Zimmermann 2022-03-03 20:58 ` [PATCH 7/9] drm/fb-helper: Provide fbdev deferred-I/O helpers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 18:56 ` Javier Martinez Canillas 2022-03-08 18:56 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 8/9] drm/gem-shmem: Implement fbdev dumb buffer and mmap helpers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 19:29 ` Javier Martinez Canillas 2022-03-08 19:29 ` Javier Martinez Canillas 2022-03-09 8:47 ` Thomas Zimmermann 2022-03-09 8:47 ` Thomas Zimmermann 2022-03-09 11:25 ` Javier Martinez Canillas [this message] 2022-03-09 11:25 ` Javier Martinez Canillas 2022-03-03 20:58 ` [PATCH 9/9] drm/virtio: Implement dumb_create_fbdev with GEM SHMEM helpers Thomas Zimmermann 2022-03-03 20:58 ` Thomas Zimmermann 2022-03-08 19:37 ` Javier Martinez Canillas 2022-03-08 19:37 ` Javier Martinez Canillas 2022-03-09 8:52 ` Thomas Zimmermann 2022-03-09 8:52 ` Thomas Zimmermann 2022-03-09 11:29 ` Javier Martinez Canillas 2022-03-09 11:29 ` Javier Martinez Canillas 2022-03-08 9:13 ` [PATCH 0/9] drm: Support GEM SHMEM fbdev without shadow FB Javier Martinez Canillas 2022-03-08 9:13 ` Javier Martinez Canillas 2022-03-08 9:44 ` Thomas Zimmermann 2022-03-08 9:44 ` Thomas Zimmermann
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=c3513c35-57a3-64e1-b3a6-0878cc61af6a@redhat.com \ --to=javierm@redhat.com \ --cc=airlied@linux.ie \ --cc=daniel@ffwll.ch \ --cc=deller@gmx.de \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-fbdev@vger.kernel.org \ --cc=maarten.lankhorst@linux.intel.com \ --cc=mripard@kernel.org \ --cc=tzimmermann@suse.de \ /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: linkBe 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.