Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/modes: Make width-mm/height-mm check in of_get_drm_panel_display_mode() mandatory

All users of this function require width-mm/height-mm DT property to be
present per their DT bindings, make width-mm/height-mm check mandatory.
It is generally a good idea to specify panel dimensions, so userspace
can configure e.g. scaling accordingly.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dmitry Osipenko <digetx@gmail.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Noralf Trønnes <noralf@tronnes.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Robert Foss <robert.foss@linaro.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
To: dri-devel@lists.freedesktop.org
Reviewed-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220411004728.68203-1-marex@denx.de

+4 -4
+4 -4
drivers/gpu/drm/drm_modes.c
··· 735 735 * @dmode: will be set to the return value 736 736 * @bus_flags: information about pixelclk, sync and DE polarity 737 737 * 738 - * The Device Tree properties width-mm and height-mm will be read and set on 739 - * the display mode if they are present. 738 + * The mandatory Device Tree properties width-mm and height-mm 739 + * are read and set on the display mode. 740 740 * 741 741 * Returns: 742 742 * Zero on success, negative error code on failure. ··· 761 761 drm_bus_flags_from_videomode(&vm, bus_flags); 762 762 763 763 ret = of_property_read_u32(np, "width-mm", &width_mm); 764 - if (ret && ret != -EINVAL) 764 + if (ret) 765 765 return ret; 766 766 767 767 ret = of_property_read_u32(np, "height-mm", &height_mm); 768 - if (ret && ret != -EINVAL) 768 + if (ret) 769 769 return ret; 770 770 771 771 dmode->width_mm = width_mm;