Rev 1221 | Rev 1404 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1221 | Rev 1321 | ||
---|---|---|---|
Line 123... | Line 123... | ||
123 | }; |
123 | }; |
Line 124... | Line 124... | ||
124 | 124 | ||
125 | DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name, |
125 | DRM_ENUM_NAME_FN(drm_get_tv_subconnector_name, |
Line -... | Line 126... | ||
- | 126 | drm_tv_subconnector_enum_list) |
|
- | 127 | ||
- | 128 | static struct drm_prop_enum_list drm_dirty_info_enum_list[] = { |
|
- | 129 | { DRM_MODE_DIRTY_OFF, "Off" }, |
|
- | 130 | { DRM_MODE_DIRTY_ON, "On" }, |
|
- | 131 | { DRM_MODE_DIRTY_ANNOTATE, "Annotate" }, |
|
- | 132 | }; |
|
- | 133 | ||
- | 134 | DRM_ENUM_NAME_FN(drm_get_dirty_info_name, |
|
126 | drm_tv_subconnector_enum_list) |
135 | drm_dirty_info_enum_list) |
127 | 136 | ||
128 | struct drm_conn_prop_enum_list { |
137 | struct drm_conn_prop_enum_list { |
129 | int type; |
138 | int type; |
130 | char *name; |
139 | char *name; |
Line 245... | Line 254... | ||
245 | mutex_lock(&dev->mode_config.idr_mutex); |
254 | mutex_lock(&dev->mode_config.idr_mutex); |
246 | idr_remove(&dev->mode_config.crtc_idr, object->id); |
255 | idr_remove(&dev->mode_config.crtc_idr, object->id); |
247 | mutex_unlock(&dev->mode_config.idr_mutex); |
256 | mutex_unlock(&dev->mode_config.idr_mutex); |
248 | } |
257 | } |
Line 249... | Line 258... | ||
249 | 258 | ||
- | 259 | struct drm_mode_object *drm_mode_object_find(struct drm_device *dev, |
|
250 | void *drm_mode_object_find(struct drm_device *dev, uint32_t id, uint32_t type) |
260 | uint32_t id, uint32_t type) |
251 | { |
261 | { |
Line 252... | Line 262... | ||
252 | struct drm_mode_object *obj = NULL; |
262 | struct drm_mode_object *obj = NULL; |
253 | 263 | ||
Line 270... | Line 280... | ||
270 | * |
280 | * |
271 | * Allocates an ID for the framebuffer's parent mode object, sets its mode |
281 | * Allocates an ID for the framebuffer's parent mode object, sets its mode |
272 | * functions & device file and adds it to the master fd list. |
282 | * functions & device file and adds it to the master fd list. |
273 | * |
283 | * |
274 | * RETURNS: |
284 | * RETURNS: |
275 | * Zero on success, error code on falure. |
285 | * Zero on success, error code on failure. |
276 | */ |
286 | */ |
277 | int drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb, |
287 | int drm_framebuffer_init(struct drm_device *dev, struct drm_framebuffer *fb, |
278 | const struct drm_framebuffer_funcs *funcs) |
288 | const struct drm_framebuffer_funcs *funcs) |
279 | { |
289 | { |
280 | int ret; |
290 | int ret; |
Line 800... | Line 810... | ||
800 | return 0; |
810 | return 0; |
801 | } |
811 | } |
802 | EXPORT_SYMBOL(drm_mode_create_dithering_property); |
812 | EXPORT_SYMBOL(drm_mode_create_dithering_property); |
Line 803... | Line 813... | ||
803 | 813 | ||
- | 814 | /** |
|
- | 815 | * drm_mode_create_dirty_property - create dirty property |
|
- | 816 | * @dev: DRM device |
|
- | 817 | * |
|
- | 818 | * Called by a driver the first time it's needed, must be attached to desired |
|
- | 819 | * connectors. |
|
- | 820 | */ |
|
- | 821 | int drm_mode_create_dirty_info_property(struct drm_device *dev) |
|
- | 822 | { |
|
- | 823 | struct drm_property *dirty_info; |
|
- | 824 | int i; |
|
- | 825 | ||
- | 826 | if (dev->mode_config.dirty_info_property) |
|
- | 827 | return 0; |
|
- | 828 | ||
- | 829 | dirty_info = |
|
- | 830 | drm_property_create(dev, DRM_MODE_PROP_ENUM | |
|
- | 831 | DRM_MODE_PROP_IMMUTABLE, |
|
- | 832 | "dirty", |
|
- | 833 | ARRAY_SIZE(drm_dirty_info_enum_list)); |
|
- | 834 | for (i = 0; i < ARRAY_SIZE(drm_dirty_info_enum_list); i++) |
|
- | 835 | drm_property_add_enum(dirty_info, i, |
|
- | 836 | drm_dirty_info_enum_list[i].type, |
|
- | 837 | drm_dirty_info_enum_list[i].name); |
|
- | 838 | dev->mode_config.dirty_info_property = dirty_info; |
|
- | 839 | ||
- | 840 | return 0; |
|
- | 841 | } |
|
- | 842 | EXPORT_SYMBOL(drm_mode_create_dirty_info_property); |
|
- | 843 | ||
804 | /** |
844 | /** |
805 | * drm_mode_config_init - initialize DRM mode_configuration structure |
845 | * drm_mode_config_init - initialize DRM mode_configuration structure |
806 | * @dev: DRM device |
846 | * @dev: DRM device |
807 | * |
847 | * |
808 | * LOCKING: |
848 | * LOCKING: |
Line 2337... | Line 2377... | ||
2337 | (*connector->funcs->dpms)(connector, (int) out_resp->value); |
2377 | (*connector->funcs->dpms)(connector, (int) out_resp->value); |
2338 | ret = 0; |
2378 | ret = 0; |
2339 | } else if (connector->funcs->set_property) |
2379 | } else if (connector->funcs->set_property) |
2340 | ret = connector->funcs->set_property(connector, property, out_resp->value); |
2380 | ret = connector->funcs->set_property(connector, property, out_resp->value); |
Line 2341... | Line 2381... | ||
2341 | 2381 | ||
2342 | /* store the property value if succesful */ |
2382 | /* store the property value if successful */ |
2343 | if (!ret) |
2383 | if (!ret) |
2344 | drm_connector_property_set_value(connector, property, out_resp->value); |
2384 | drm_connector_property_set_value(connector, property, out_resp->value); |
2345 | out: |
2385 | out: |
2346 | mutex_unlock(&dev->mode_config.mutex); |
2386 | mutex_unlock(&dev->mode_config.mutex); |