| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: drm_crtc.c,v 1.16 2020/02/14 14:34:57 maya Exp $ */ | | 1 | /* $NetBSD: drm_crtc.c,v 1.17 2020/06/27 13:39:05 jmcneill Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2006-2008 Intel Corporation | | 4 | * Copyright (c) 2006-2008 Intel Corporation |
5 | * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> | | 5 | * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> |
6 | * Copyright (c) 2008 Red Hat Inc. | | 6 | * Copyright (c) 2008 Red Hat Inc. |
7 | * | | 7 | * |
8 | * DRM core CRTC related functions | | 8 | * DRM core CRTC related functions |
9 | * | | 9 | * |
10 | * Permission to use, copy, modify, distribute, and sell this software and its | | 10 | * Permission to use, copy, modify, distribute, and sell this software and its |
11 | * documentation for any purpose is hereby granted without fee, provided that | | 11 | * documentation for any purpose is hereby granted without fee, provided that |
12 | * the above copyright notice appear in all copies and that both that copyright | | 12 | * the above copyright notice appear in all copies and that both that copyright |
13 | * notice and this permission notice appear in supporting documentation, and | | 13 | * notice and this permission notice appear in supporting documentation, and |
14 | * that the name of the copyright holders not be used in advertising or | | 14 | * that the name of the copyright holders not be used in advertising or |
| @@ -22,27 +22,27 @@ | | | @@ -22,27 +22,27 @@ |
22 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR | | 22 | * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR |
23 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, | | 23 | * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, |
24 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER | | 24 | * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER |
25 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE | | 25 | * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
26 | * OF THIS SOFTWARE. | | 26 | * OF THIS SOFTWARE. |
27 | * | | 27 | * |
28 | * Authors: | | 28 | * Authors: |
29 | * Keith Packard | | 29 | * Keith Packard |
30 | * Eric Anholt <eric@anholt.net> | | 30 | * Eric Anholt <eric@anholt.net> |
31 | * Dave Airlie <airlied@linux.ie> | | 31 | * Dave Airlie <airlied@linux.ie> |
32 | * Jesse Barnes <jesse.barnes@intel.com> | | 32 | * Jesse Barnes <jesse.barnes@intel.com> |
33 | */ | | 33 | */ |
34 | #include <sys/cdefs.h> | | 34 | #include <sys/cdefs.h> |
35 | __KERNEL_RCSID(0, "$NetBSD: drm_crtc.c,v 1.16 2020/02/14 14:34:57 maya Exp $"); | | 35 | __KERNEL_RCSID(0, "$NetBSD: drm_crtc.c,v 1.17 2020/06/27 13:39:05 jmcneill Exp $"); |
36 | | | 36 | |
37 | #include <linux/ctype.h> | | 37 | #include <linux/ctype.h> |
38 | #include <linux/list.h> | | 38 | #include <linux/list.h> |
39 | #include <linux/slab.h> | | 39 | #include <linux/slab.h> |
40 | #include <linux/export.h> | | 40 | #include <linux/export.h> |
41 | #include <drm/drmP.h> | | 41 | #include <drm/drmP.h> |
42 | #include <drm/drm_crtc.h> | | 42 | #include <drm/drm_crtc.h> |
43 | #include <drm/drm_edid.h> | | 43 | #include <drm/drm_edid.h> |
44 | #include <drm/drm_fourcc.h> | | 44 | #include <drm/drm_fourcc.h> |
45 | #include <drm/drm_modeset_lock.h> | | 45 | #include <drm/drm_modeset_lock.h> |
46 | #include <drm/drm_atomic.h> | | 46 | #include <drm/drm_atomic.h> |
47 | | | 47 | |
48 | #include "drm_crtc_internal.h" | | 48 | #include "drm_crtc_internal.h" |
| @@ -815,33 +815,34 @@ EXPORT_SYMBOL(drm_display_info_set_bus_f | | | @@ -815,33 +815,34 @@ EXPORT_SYMBOL(drm_display_info_set_bus_f |
815 | /** | | 815 | /** |
816 | * drm_connector_get_cmdline_mode - reads the user's cmdline mode | | 816 | * drm_connector_get_cmdline_mode - reads the user's cmdline mode |
817 | * @connector: connector to quwery | | 817 | * @connector: connector to quwery |
818 | * | | 818 | * |
819 | * The kernel supports per-connector configration of its consoles through | | 819 | * The kernel supports per-connector configration of its consoles through |
820 | * use of the video= parameter. This function parses that option and | | 820 | * use of the video= parameter. This function parses that option and |
821 | * extracts the user's specified mode (or enable/disable status) for a | | 821 | * extracts the user's specified mode (or enable/disable status) for a |
822 | * particular connector. This is typically only used during the early fbdev | | 822 | * particular connector. This is typically only used during the early fbdev |
823 | * setup. | | 823 | * setup. |
824 | */ | | 824 | */ |
825 | static void drm_connector_get_cmdline_mode(struct drm_connector *connector) | | 825 | static void drm_connector_get_cmdline_mode(struct drm_connector *connector) |
826 | { | | 826 | { |
827 | struct drm_cmdline_mode *mode = &connector->cmdline_mode; | | 827 | struct drm_cmdline_mode *mode = &connector->cmdline_mode; |
828 | char *option = NULL; | | | |
829 | | | 828 | |
830 | #ifdef __NetBSD__ | | 829 | #ifdef __NetBSD__ |
| | | 830 | const char *option; |
831 | prop_dictionary_t prop = device_properties(connector->dev->dev); | | 831 | prop_dictionary_t prop = device_properties(connector->dev->dev); |
832 | if (!prop_dictionary_get_cstring(prop, connector->name, &option)) | | 832 | if (!prop_dictionary_get_string(prop, connector->name, &option)) |
833 | return; | | 833 | return; |
834 | #else | | 834 | #else |
| | | 835 | char *option = NULL; |
835 | if (fb_get_options(connector->name, &option)) | | 836 | if (fb_get_options(connector->name, &option)) |
836 | return; | | 837 | return; |
837 | #endif | | 838 | #endif |
838 | | | 839 | |
839 | if (!drm_mode_parse_command_line_for_connector(option, | | 840 | if (!drm_mode_parse_command_line_for_connector(option, |
840 | connector, | | 841 | connector, |
841 | mode)) | | 842 | mode)) |
842 | return; | | 843 | return; |
843 | | | 844 | |
844 | if (mode->force) { | | 845 | if (mode->force) { |
845 | const char *s; | | 846 | const char *s; |
846 | | | 847 | |
847 | switch (mode->force) { | | 848 | switch (mode->force) { |