From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: "Simon Glass" <sjg@chromium.org>,
"Anatolij Gustschin" <agust@denx.de>,
"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
"Pali Rohár" <pali@kernel.org>, "Stefan Roese" <sr@denx.de>
Subject: [PATCH] sandbox: video: Fix building without SDL
Date: Fri, 17 Feb 2023 15:45:47 -0700 [thread overview]
Message-ID: <20230217224547.1647994-1-sjg@chromium.org> (raw)
This is currently broken. If SDL is not installed, SANDBOX_SDL becomes
false and build errors are generated, e.g.:
test/dm/video.c:424: undefined reference to `sandbox_sdl_set_bpp'
Fix it by making the function return an error in this case.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/sandbox/include/asm/test.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/sandbox/include/asm/test.h b/arch/sandbox/include/asm/test.h
index 4853dc948f3..e482271fe97 100644
--- a/arch/sandbox/include/asm/test.h
+++ b/arch/sandbox/include/asm/test.h
@@ -300,6 +300,7 @@ void sandbox_cros_ec_set_test_flags(struct udevice *dev, uint flags);
*/
int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
+#if IS_ENABLED(CONFIG_SANDBOX_SDL)
/**
* sandbox_sdl_set_bpp() - Set the depth of the sandbox display
*
@@ -315,6 +316,13 @@ int sandbox_cros_ec_get_pwm_duty(struct udevice *dev, uint index, uint *duty);
* after the change
*/
int sandbox_sdl_set_bpp(struct udevice *dev, enum video_log2_bpp l2bpp);
+#else
+static inline int sandbox_sdl_set_bpp(struct udevice *dev,
+ enum video_log2_bpp l2bpp)
+{
+ return -ENOSYS;
+}
+#endif
/**
* sandbox_set_fake_efi_mgr_dev() - Control EFI bootmgr producing valid bootflow
--
2.39.2.637.g21b0678d19-goog
next reply other threads:[~2023-02-17 22:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 22:45 Simon Glass [this message]
2023-04-07 19:58 ` [PATCH] sandbox: video: Fix building without SDL Anatolij Gustschin
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=20230217224547.1647994-1-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=agust@denx.de \
--cc=pali@kernel.org \
--cc=sr@denx.de \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.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.