All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: Simon Glass <sjg@chromium.org>,
	U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Harald Seiler <hws@denx.de>
Subject: Re: [PATCH 08/22] sandbox: Add work-around for SDL2 display
Date: Thu, 22 Jul 2021 08:00:33 +0200	[thread overview]
Message-ID: <b47637a3-1aaf-1ba6-9584-e5b56bbf2e3b@gmx.de> (raw)
In-Reply-To: <20210705223300.2139971-7-sjg@chromium.org>



On 7/6/21 12:32 AM, Simon Glass wrote:
> At present the display does not show on some machines, e.g. Ubunutu
> 20.04 but the reason is unknown. Add a work-around until this can be
> determined.

I am running Ubuntu 20.04 and

     ./u-boot -T -l

shows the graphical console for sandbox_defconfig.

Please, provide more detail on how to reproduce the issue on Ubuntu Hirsute.

Best regards

Heinrich

>
> Also include more error checking just in case.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>   arch/sandbox/cpu/sdl.c | 23 ++++++++++++++++++++++-
>   1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c
> index 8102649be3a..e2649494818 100644
> --- a/arch/sandbox/cpu/sdl.c
> +++ b/arch/sandbox/cpu/sdl.c
> @@ -164,8 +164,29 @@ int sandbox_sdl_init_display(int width, int height, int log2_bpp,
>
>   int sandbox_sdl_sync(void *lcd_base)
>   {
> +	struct SDL_Rect rect;
> +	int ret;
> +
> +	if (!sdl.texture)
> +		return 0;
> +	SDL_RenderClear(sdl.renderer);
>   	SDL_UpdateTexture(sdl.texture, NULL, lcd_base, sdl.pitch);
> -	SDL_RenderCopy(sdl.renderer, sdl.texture, NULL, NULL);
> +	ret = SDL_RenderCopy(sdl.renderer, sdl.texture, NULL, NULL);
> +	if (ret) {
> +		printf("SDL copy %d: %s\n", ret, SDL_GetError());
> +		return -EIO;
> +	}
> +
> +	/*
> +	 * On some machines this does not appear. Draw an empty rectangle which
> +	 * seems to fix that.
> +	 */
> +	rect.x = 0;
> +	rect.y = 0;
> +	rect.w = 0;
> +	rect.h = 0;
> +	SDL_RenderDrawRect(sdl.renderer, &rect);
> +
>   	SDL_RenderPresent(sdl.renderer);
>   	sandbox_sdl_poll_events();
>
>

  reply	other threads:[~2021-07-22  6:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-05 22:32 [PATCH 00/22] Various fixes and enhancements Simon Glass
2021-07-05 22:32 ` [PATCH 01/22] dm: core: Add logging for DM_SEQ_ALIAS Simon Glass
2021-07-05 22:32 ` [PATCH 02/22] dm: Support lzma in the flashmap Simon Glass
2021-07-05 22:32 ` [PATCH 03/22] test: Allow CONFIG_SPL_LOAD_FIT to be disabled Simon Glass
2021-07-05 22:32 ` [PATCH 04/22] test: Add DM_DMA " Simon Glass
2021-07-05 22:32 ` [PATCH 05/22] test: Avoid a build error with SPL Simon Glass
2021-07-05 22:32 ` [PATCH 06/22] Makefile: Avoid rebuilding .dtb files each time Simon Glass
2021-07-05 22:32 ` [PATCH 07/22] sandbox: Support executables for more phases Simon Glass
2021-07-05 22:32 ` [PATCH 08/22] sandbox: Add work-around for SDL2 display Simon Glass
2021-07-22  6:00   ` Heinrich Schuchardt [this message]
2021-07-22 13:28     ` Simon Glass
2021-07-05 22:32 ` [PATCH 09/22] sandbox: Use hinting with the display Simon Glass
2021-07-05 22:32 ` [PATCH 10/22] sandbox: Adjust the bloblist default address Simon Glass
2021-07-05 22:32 ` [PATCH 11/22] cros_ec: Allow reading the battery-charge state Simon Glass
2021-07-05 22:32 ` [PATCH 12/22] cros_ec: Drop cros_ec_entering_mode() Simon Glass
2021-07-05 22:32 ` [PATCH 13/22] cros_ec: Support the full-size vboot context Simon Glass
2021-07-05 22:32 ` [PATCH 14/22] cros_ec: Use standard calls for recovery-request checking Simon Glass
2021-07-05 22:32 ` [PATCH 15/22] bloblist: Support resizing a blob Simon Glass
2021-07-05 22:32 ` [PATCH 16/22] bloblist: Tidy up a few API comments Simon Glass
2021-07-05 22:32 ` [PATCH 17/22] bloblist: Correct condition in bloblist_addrec() Simon Glass
2021-07-05 22:32 ` [PATCH 18/22] image: Allow @ in node names when not using signatures Simon Glass
2021-07-17 20:40   ` Simon Glass
2021-07-05 22:32 ` [PATCH 19/22] spl: Provide more information on boot failure Simon Glass
2021-07-05 22:32 ` [PATCH 20/22] sandbox: mmc: Support fixed MMC devices Simon Glass
2021-07-06  1:12   ` Jaehoon Chung
2021-07-17 20:39   ` Simon Glass
2021-07-05 22:32 ` [PATCH 21/22] blk: Support iteration Simon Glass
2021-07-05 22:33 ` [PATCH 22/22] log: Allow padding of the function name Simon Glass
2021-07-17 20:39 ` Simon Glass
2021-07-17 20:39 ` [PATCH 21/22] blk: Support iteration Simon Glass
2021-07-17 20:39 ` [PATCH 19/22] spl: Provide more information on boot failure Simon Glass
2021-07-17 20:39 ` [PATCH 17/22] bloblist: Correct condition in bloblist_addrec() Simon Glass
2021-07-17 20:39 ` [PATCH 16/22] bloblist: Tidy up a few API comments Simon Glass
2021-07-17 20:39 ` [PATCH 15/22] bloblist: Support resizing a blob Simon Glass
2021-07-17 20:39 ` [PATCH 14/22] cros_ec: Use standard calls for recovery-request checking Simon Glass
2021-07-17 20:39 ` [PATCH 13/22] cros_ec: Support the full-size vboot context Simon Glass
2021-07-17 20:39 ` [PATCH 12/22] cros_ec: Drop cros_ec_entering_mode() Simon Glass
2021-07-17 20:39 ` [PATCH 11/22] cros_ec: Allow reading the battery-charge state Simon Glass
2021-07-17 20:39 ` [PATCH 10/22] sandbox: Adjust the bloblist default address Simon Glass
2021-07-17 20:39 ` [PATCH 09/22] sandbox: Use hinting with the display Simon Glass
2021-07-17 20:39 ` [PATCH 08/22] sandbox: Add work-around for SDL2 display Simon Glass
2021-07-17 20:39 ` [PATCH 07/22] sandbox: Support executables for more phases Simon Glass
2021-07-17 20:39 ` [PATCH 06/22] Makefile: Avoid rebuilding .dtb files each time Simon Glass
2021-07-18 13:34   ` Masahiro Yamada
2021-07-22  2:13     ` Simon Glass
2021-07-17 20:39 ` [PATCH 05/22] test: Avoid a build error with SPL Simon Glass
2021-07-17 20:39 ` [PATCH 04/22] test: Add DM_DMA to be disabled Simon Glass
2021-07-17 20:39 ` [PATCH 03/22] test: Allow CONFIG_SPL_LOAD_FIT " Simon Glass
2021-07-17 20:39 ` [PATCH 02/22] dm: Support lzma in the flashmap Simon Glass
2021-07-17 20:39 ` [PATCH 01/22] dm: core: Add logging for DM_SEQ_ALIAS Simon Glass

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=b47637a3-1aaf-1ba6-9584-e5b56bbf2e3b@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=hws@denx.de \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.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: 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.