From: Javier Martinez Canillas <javierm@redhat.com>
To: Thomas Zimmermann <tzimmermann@suse.de>,
daniel@ffwll.ch, airlied@gmail.com, sam@ravnborg.org,
mripard@kernel.org, maarten.lankhorst@linux.intel.com
Cc: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
linux-aspeed@lists.ozlabs.org,
linux-arm-kernel@lists.infradead.org,
etnaviv@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org,
linux-hyperv@vger.kernel.org, intel-gfx@lists.freedesktop.org,
linux-mips@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-arm-msm@vger.kernel.org,
freedreno@lists.freedesktop.org, nouveau@lists.freedesktop.org,
virtualization@lists.linux-foundation.org,
spice-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org,
linux-rockchip@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org,
xen-devel@lists.xenproject.org
Subject: Re: [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation
Date: Wed, 2 Nov 2022 11:46:42 +0100 [thread overview]
Message-ID: <5abf94d6-9a48-525e-c562-605529c5793a@redhat.com> (raw)
In-Reply-To: <0ca70b76-c24a-4fdb-cf0d-2647d37379df@suse.de>
On 11/2/22 11:33, Thomas Zimmermann wrote:
[...]
>>
>>> +static ssize_t __drm_fb_helper_write(struct fb_info *info, const char __user *buf, size_t count,
>>> + loff_t *ppos, drm_fb_helper_write_screen write_screen)
>>> +{
>>
>> [...]
>>
>>> + /*
>>> + * Copy to framebuffer even if we already logged an error. Emulates
>>> + * the behavior of the original fbdev implementation.
>>> + */
>>> + ret = write_screen(info, buf, count, pos);
>>> + if (ret < 0)
>>> + return ret; /* return last error, if any */
>>> + else if (!ret)
>>> + return err; /* return previous error, if any */
>>> +
>>> + *ppos += ret;
>>> +
>>
>> Should *ppos be incremented even if the previous error is returned?
>
> Yes. It emulates the original fbdev code at [1]. Further down in that
> function, the position is being updated even if an error occured. We
> only return the initial error if no bytes got written.
>
> It could happen that some userspace program hits to error, but still
> relies on the output and position being updated. IIRC I even added
> validation of this behavior to the IGT fbdev tests. I agree that this
> is somewhat bogus behavior, but changing it would change long-standing
> userspace semantics.
>
Thanks for the explanation, feel free then to also add to this patch:
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2022-11-02 10:47 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-24 11:19 [PATCH v2 00/21] drm/fb-helper: Untangle fbdev emulation and helpers Thomas Zimmermann
2022-10-24 11:19 ` [PATCH v2 01/21] drm/komeda: Don't set struct drm_driver.lastclose Thomas Zimmermann
2022-10-31 11:58 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 02/21] drm/mcde: " Thomas Zimmermann
2022-10-31 11:59 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 03/21] drm/vboxvideo: " Thomas Zimmermann
2022-10-31 12:00 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 04/21] drm/amdgpu: Don't set struct drm_driver.output_poll_changed Thomas Zimmermann
2022-10-31 12:08 ` Javier Martinez Canillas
2022-10-31 12:13 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 05/21] drm/imx/dcss: " Thomas Zimmermann
2022-10-31 12:16 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 06/21] drm/ingenic: " Thomas Zimmermann
2022-10-31 12:17 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 07/21] drm/logicvc: " Thomas Zimmermann
2022-10-31 12:18 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 08/21] drm/rockchip: " Thomas Zimmermann
2022-10-31 12:19 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 09/21] drm/panel-ili9341: Include <linux/backlight.h> Thomas Zimmermann
2022-10-31 12:21 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 10/21] drm/tve200: Include <linux/of.h> Thomas Zimmermann
2022-10-31 12:22 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 11/21] drm/fb-helper: Cleanup include statements in header file Thomas Zimmermann
2022-10-31 12:23 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 12/21] drm/fb_helper: Rename field fbdev to info in struct drm_fb_helper Thomas Zimmermann
2022-10-31 12:25 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 13/21] drm/fb-helper: Rename drm_fb_helper_alloc_fbi() to use _info postfix Thomas Zimmermann
2022-10-31 12:26 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 14/21] drm/fb-helper: Rename drm_fb_helper_unregister_fbi() " Thomas Zimmermann
2022-10-31 13:27 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 15/21] drm/fb-helper: Disconnect damage worker from update logic Thomas Zimmermann
2022-11-02 9:03 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 16/21] drm/fb-helper: Call fb_sync in I/O functions Thomas Zimmermann
2022-11-02 9:05 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 17/21] drm/fb-helper: Perform all fbdev I/O with the same implementation Thomas Zimmermann
2022-11-02 9:32 ` Javier Martinez Canillas
2022-11-02 10:33 ` Thomas Zimmermann
2022-11-02 10:46 ` Javier Martinez Canillas [this message]
2022-10-24 11:19 ` [PATCH v2 18/21] drm/fb_helper: Minimize damage-helper overhead Thomas Zimmermann
2022-11-02 9:39 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 19/21] drm/fb-helper: Always initialize generic fbdev emulation Thomas Zimmermann
2022-11-02 9:40 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 20/21] drm/fb-helper: Move generic fbdev emulation into separate source file Thomas Zimmermann
2022-11-02 10:01 ` Javier Martinez Canillas
2022-10-24 11:19 ` [PATCH v2 21/21] drm/fb-helper: Remove unnecessary include statements Thomas Zimmermann
2022-11-02 10:02 ` Javier Martinez Canillas
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=5abf94d6-9a48-525e-c562-605529c5793a@redhat.com \
--to=javierm@redhat.com \
--cc=airlied@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=etnaviv@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=linux-tegra@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=sam@ravnborg.org \
--cc=spice-devel@lists.freedesktop.org \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux-foundation.org \
--cc=xen-devel@lists.xenproject.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
all inboxes | Powered by JetHome®