diff options
author | Thierry Reding <treding@nvidia.com> | 2014-12-10 07:03:34 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-12-10 08:12:30 -0500 |
commit | 4dfd909f92d623d79a23985526314bb31bdd110a (patch) | |
tree | bbf6e650e80309a9b5e8910c5bae8b36a16bc761 /drivers/gpu/drm/drm_crtc.c | |
parent | c422f31d5654a4787a226bb684bd601d4db9558d (diff) |
drm: Miscellaneous checkpatch whitespace cleanups
A couple of whitespace changes required to silent various errors and
warnings flagged by checkpatch.
checkpatch requires that the opening brace be on the same line as a
variable declaration. Furthermore an empty line is required after a
block of variable declarations. Trailing whitespace as well as using
spaces before tabs is considered an error or warning, respectively.
Finally, the closing parenthesis of an if condition and the opening
brace of the conditional block should be separated by a space.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 632e6eaf4c74..76aa8fb787dc 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -61,8 +61,8 @@ static struct drm_framebuffer *add_framebuffer_internal(struct drm_device *dev, | |||
61 | /* | 61 | /* |
62 | * Global properties | 62 | * Global properties |
63 | */ | 63 | */ |
64 | static const struct drm_prop_enum_list drm_dpms_enum_list[] = | 64 | static const struct drm_prop_enum_list drm_dpms_enum_list[] = { |
65 | { { DRM_MODE_DPMS_ON, "On" }, | 65 | { DRM_MODE_DPMS_ON, "On" }, |
66 | { DRM_MODE_DPMS_STANDBY, "Standby" }, | 66 | { DRM_MODE_DPMS_STANDBY, "Standby" }, |
67 | { DRM_MODE_DPMS_SUSPEND, "Suspend" }, | 67 | { DRM_MODE_DPMS_SUSPEND, "Suspend" }, |
68 | { DRM_MODE_DPMS_OFF, "Off" } | 68 | { DRM_MODE_DPMS_OFF, "Off" } |
@@ -70,8 +70,7 @@ static const struct drm_prop_enum_list drm_dpms_enum_list[] = | |||
70 | 70 | ||
71 | DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list) | 71 | DRM_ENUM_NAME_FN(drm_get_dpms_name, drm_dpms_enum_list) |
72 | 72 | ||
73 | static const struct drm_prop_enum_list drm_plane_type_enum_list[] = | 73 | static const struct drm_prop_enum_list drm_plane_type_enum_list[] = { |
74 | { | ||
75 | { DRM_PLANE_TYPE_OVERLAY, "Overlay" }, | 74 | { DRM_PLANE_TYPE_OVERLAY, "Overlay" }, |
76 | { DRM_PLANE_TYPE_PRIMARY, "Primary" }, | 75 | { DRM_PLANE_TYPE_PRIMARY, "Primary" }, |
77 | { DRM_PLANE_TYPE_CURSOR, "Cursor" }, | 76 | { DRM_PLANE_TYPE_CURSOR, "Cursor" }, |
@@ -80,8 +79,7 @@ static const struct drm_prop_enum_list drm_plane_type_enum_list[] = | |||
80 | /* | 79 | /* |
81 | * Optional properties | 80 | * Optional properties |
82 | */ | 81 | */ |
83 | static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = | 82 | static const struct drm_prop_enum_list drm_scaling_mode_enum_list[] = { |
84 | { | ||
85 | { DRM_MODE_SCALE_NONE, "None" }, | 83 | { DRM_MODE_SCALE_NONE, "None" }, |
86 | { DRM_MODE_SCALE_FULLSCREEN, "Full" }, | 84 | { DRM_MODE_SCALE_FULLSCREEN, "Full" }, |
87 | { DRM_MODE_SCALE_CENTER, "Center" }, | 85 | { DRM_MODE_SCALE_CENTER, "Center" }, |
@@ -97,8 +95,7 @@ static const struct drm_prop_enum_list drm_aspect_ratio_enum_list[] = { | |||
97 | /* | 95 | /* |
98 | * Non-global properties, but "required" for certain connectors. | 96 | * Non-global properties, but "required" for certain connectors. |
99 | */ | 97 | */ |
100 | static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] = | 98 | static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] = { |
101 | { | ||
102 | { DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */ | 99 | { DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */ |
103 | { DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */ | 100 | { DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */ |
104 | { DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */ | 101 | { DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */ |
@@ -106,8 +103,7 @@ static const struct drm_prop_enum_list drm_dvi_i_select_enum_list[] = | |||
106 | 103 | ||
107 | DRM_ENUM_NAME_FN(drm_get_dvi_i_select_name, drm_dvi_i_select_enum_list) | 104 | DRM_ENUM_NAME_FN(drm_get_dvi_i_select_name, drm_dvi_i_select_enum_list) |
108 | 105 | ||
109 | static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] = | 106 | static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] = { |
110 | { | ||
111 | { DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */ | 107 | { DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */ |
112 | { DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */ | 108 | { DRM_MODE_SUBCONNECTOR_DVID, "DVI-D" }, /* DVI-I */ |
113 | { DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */ | 109 | { DRM_MODE_SUBCONNECTOR_DVIA, "DVI-A" }, /* DVI-I */ |
@@ -116,8 +112,7 @@ static const struct drm_prop_enum_list drm_dvi_i_subconnector_enum_list[] = | |||
116 | DRM_ENUM_NAME_FN(drm_get_dvi_i_subconnector_name, | 112 | DRM_ENUM_NAME_FN(drm_get_dvi_i_subconnector_name, |
117 | drm_dvi_i_subconnector_enum_list) | 113 | drm_dvi_i_subconnector_enum_list) |
118 | 114 | ||
119 | static const struct drm_prop_enum_list drm_tv_select_enum_list[] = | 115 | static const struct drm_prop_enum_list drm_tv_select_enum_list[] = { |
120 | { | ||
121 | { DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */ | 116 | { DRM_MODE_SUBCONNECTOR_Automatic, "Automatic" }, /* DVI-I and TV-out */ |
122 | { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */ | 117 | { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */ |
123 | { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */ | 118 | { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */ |
@@ -127,8 +122,7 @@ static const struct drm_prop_enum_list drm_tv_select_enum_list[] = | |||
127 | 122 | ||
128 | DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list) | 123 | DRM_ENUM_NAME_FN(drm_get_tv_select_name, drm_tv_select_enum_list) |
129 | 124 | ||
130 | static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] = | 125 | static const struct drm_prop_enum_list drm_tv_subconnector_enum_list[] = { |
131 | { | ||
132 | { DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */ | 126 | { DRM_MODE_SUBCONNECTOR_Unknown, "Unknown" }, /* DVI-I and TV-out */ |
133 | { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */ | 127 | { DRM_MODE_SUBCONNECTOR_Composite, "Composite" }, /* TV-out */ |
134 | { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */ | 128 | { DRM_MODE_SUBCONNECTOR_SVIDEO, "SVIDEO" }, /* TV-out */ |
@@ -154,8 +148,8 @@ struct drm_conn_prop_enum_list { | |||
154 | /* | 148 | /* |
155 | * Connector and encoder types. | 149 | * Connector and encoder types. |
156 | */ | 150 | */ |
157 | static struct drm_conn_prop_enum_list drm_connector_enum_list[] = | 151 | static struct drm_conn_prop_enum_list drm_connector_enum_list[] = { |
158 | { { DRM_MODE_CONNECTOR_Unknown, "Unknown" }, | 152 | { DRM_MODE_CONNECTOR_Unknown, "Unknown" }, |
159 | { DRM_MODE_CONNECTOR_VGA, "VGA" }, | 153 | { DRM_MODE_CONNECTOR_VGA, "VGA" }, |
160 | { DRM_MODE_CONNECTOR_DVII, "DVI-I" }, | 154 | { DRM_MODE_CONNECTOR_DVII, "DVI-I" }, |
161 | { DRM_MODE_CONNECTOR_DVID, "DVI-D" }, | 155 | { DRM_MODE_CONNECTOR_DVID, "DVI-D" }, |
@@ -174,8 +168,8 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = | |||
174 | { DRM_MODE_CONNECTOR_DSI, "DSI" }, | 168 | { DRM_MODE_CONNECTOR_DSI, "DSI" }, |
175 | }; | 169 | }; |
176 | 170 | ||
177 | static const struct drm_prop_enum_list drm_encoder_enum_list[] = | 171 | static const struct drm_prop_enum_list drm_encoder_enum_list[] = { |
178 | { { DRM_MODE_ENCODER_NONE, "None" }, | 172 | { DRM_MODE_ENCODER_NONE, "None" }, |
179 | { DRM_MODE_ENCODER_DAC, "DAC" }, | 173 | { DRM_MODE_ENCODER_DAC, "DAC" }, |
180 | { DRM_MODE_ENCODER_TMDS, "TMDS" }, | 174 | { DRM_MODE_ENCODER_TMDS, "TMDS" }, |
181 | { DRM_MODE_ENCODER_LVDS, "LVDS" }, | 175 | { DRM_MODE_ENCODER_LVDS, "LVDS" }, |
@@ -185,8 +179,7 @@ static const struct drm_prop_enum_list drm_encoder_enum_list[] = | |||
185 | { DRM_MODE_ENCODER_DPMST, "DP MST" }, | 179 | { DRM_MODE_ENCODER_DPMST, "DP MST" }, |
186 | }; | 180 | }; |
187 | 181 | ||
188 | static const struct drm_prop_enum_list drm_subpixel_enum_list[] = | 182 | static const struct drm_prop_enum_list drm_subpixel_enum_list[] = { |
189 | { | ||
190 | { SubPixelUnknown, "Unknown" }, | 183 | { SubPixelUnknown, "Unknown" }, |
191 | { SubPixelHorizontalRGB, "Horizontal RGB" }, | 184 | { SubPixelHorizontalRGB, "Horizontal RGB" }, |
192 | { SubPixelHorizontalBGR, "Horizontal BGR" }, | 185 | { SubPixelHorizontalBGR, "Horizontal BGR" }, |
@@ -1137,6 +1130,7 @@ EXPORT_SYMBOL(drm_encoder_init); | |||
1137 | void drm_encoder_cleanup(struct drm_encoder *encoder) | 1130 | void drm_encoder_cleanup(struct drm_encoder *encoder) |
1138 | { | 1131 | { |
1139 | struct drm_device *dev = encoder->dev; | 1132 | struct drm_device *dev = encoder->dev; |
1133 | |||
1140 | drm_modeset_lock_all(dev); | 1134 | drm_modeset_lock_all(dev); |
1141 | drm_mode_object_put(dev, &encoder->base); | 1135 | drm_mode_object_put(dev, &encoder->base); |
1142 | kfree(encoder->name); | 1136 | kfree(encoder->name); |
@@ -2519,7 +2513,7 @@ int drm_mode_setplane(struct drm_device *dev, void *data, | |||
2519 | * | 2513 | * |
2520 | * This is a little helper to wrap internal calls to the ->set_config driver | 2514 | * This is a little helper to wrap internal calls to the ->set_config driver |
2521 | * interface. The only thing it adds is correct refcounting dance. | 2515 | * interface. The only thing it adds is correct refcounting dance. |
2522 | * | 2516 | * |
2523 | * Returns: | 2517 | * Returns: |
2524 | * Zero on success, negative errno on failure. | 2518 | * Zero on success, negative errno on failure. |
2525 | */ | 2519 | */ |
@@ -2958,6 +2952,7 @@ int drm_mode_cursor2_ioctl(struct drm_device *dev, | |||
2958 | void *data, struct drm_file *file_priv) | 2952 | void *data, struct drm_file *file_priv) |
2959 | { | 2953 | { |
2960 | struct drm_mode_cursor2 *req = data; | 2954 | struct drm_mode_cursor2 *req = data; |
2955 | |||
2961 | return drm_mode_cursor_common(dev, req, file_priv); | 2956 | return drm_mode_cursor_common(dev, req, file_priv); |
2962 | } | 2957 | } |
2963 | 2958 | ||
@@ -4047,7 +4042,7 @@ int drm_mode_getblob_ioctl(struct drm_device *dev, | |||
4047 | 4042 | ||
4048 | if (out_resp->length == blob->length) { | 4043 | if (out_resp->length == blob->length) { |
4049 | blob_ptr = (void __user *)(unsigned long)out_resp->data; | 4044 | blob_ptr = (void __user *)(unsigned long)out_resp->data; |
4050 | if (copy_to_user(blob_ptr, blob->data, blob->length)){ | 4045 | if (copy_to_user(blob_ptr, blob->data, blob->length)) { |
4051 | ret = -EFAULT; | 4046 | ret = -EFAULT; |
4052 | goto done; | 4047 | goto done; |
4053 | } | 4048 | } |
@@ -4149,6 +4144,7 @@ static bool drm_property_change_is_valid(struct drm_property *property, | |||
4149 | return true; | 4144 | return true; |
4150 | } else if (drm_property_type_is(property, DRM_MODE_PROP_SIGNED_RANGE)) { | 4145 | } else if (drm_property_type_is(property, DRM_MODE_PROP_SIGNED_RANGE)) { |
4151 | int64_t svalue = U642I64(value); | 4146 | int64_t svalue = U642I64(value); |
4147 | |||
4152 | if (svalue < U642I64(property->values[0]) || | 4148 | if (svalue < U642I64(property->values[0]) || |
4153 | svalue > U642I64(property->values[1])) | 4149 | svalue > U642I64(property->values[1])) |
4154 | return false; | 4150 | return false; |
@@ -4156,6 +4152,7 @@ static bool drm_property_change_is_valid(struct drm_property *property, | |||
4156 | } else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) { | 4152 | } else if (drm_property_type_is(property, DRM_MODE_PROP_BITMASK)) { |
4157 | int i; | 4153 | int i; |
4158 | uint64_t valid_mask = 0; | 4154 | uint64_t valid_mask = 0; |
4155 | |||
4159 | for (i = 0; i < property->num_values; i++) | 4156 | for (i = 0; i < property->num_values; i++) |
4160 | valid_mask |= (1ULL << property->values[i]); | 4157 | valid_mask |= (1ULL << property->values[i]); |
4161 | return !(value & ~valid_mask); | 4158 | return !(value & ~valid_mask); |
@@ -4164,6 +4161,7 @@ static bool drm_property_change_is_valid(struct drm_property *property, | |||
4164 | return true; | 4161 | return true; |
4165 | } else if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) { | 4162 | } else if (drm_property_type_is(property, DRM_MODE_PROP_OBJECT)) { |
4166 | struct drm_mode_object *obj; | 4163 | struct drm_mode_object *obj; |
4164 | |||
4167 | /* a zero value for an object property translates to null: */ | 4165 | /* a zero value for an object property translates to null: */ |
4168 | if (value == 0) | 4166 | if (value == 0) |
4169 | return true; | 4167 | return true; |