drm_plane_helper.c 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604
  1. /*
  2. * Copyright (C) 2014 Intel Corporation
  3. *
  4. * DRM universal plane helper functions
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a
  7. * copy of this software and associated documentation files (the "Software"),
  8. * to deal in the Software without restriction, including without limitation
  9. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  10. * and/or sell copies of the Software, and to permit persons to whom the
  11. * Software is furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice (including the next
  14. * paragraph) shall be included in all copies or substantial portions of the
  15. * Software.
  16. *
  17. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  18. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  19. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  20. * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  21. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  22. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
  23. * SOFTWARE.
  24. */
  25. #include <linux/list.h>
  26. #include <drm/drmP.h>
  27. #include <drm/drm_plane_helper.h>
  28. #include <drm/drm_rect.h>
  29. #include <drm/drm_atomic.h>
  30. #include <drm/drm_crtc_helper.h>
  31. #include <drm/drm_atomic_helper.h>
  32. #define SUBPIXEL_MASK 0xffff
  33. /**
  34. * DOC: overview
  35. *
  36. * This helper library has two parts. The first part has support to implement
  37. * primary plane support on top of the normal CRTC configuration interface.
  38. * Since the legacy ->set_config interface ties the primary plane together with
  39. * the CRTC state this does not allow userspace to disable the primary plane
  40. * itself. To avoid too much duplicated code use
  41. * drm_plane_helper_check_update() which can be used to enforce the same
  42. * restrictions as primary planes had thus. The default primary plane only
  43. * expose XRBG8888 and ARGB8888 as valid pixel formats for the attached
  44. * framebuffer.
  45. *
  46. * Drivers are highly recommended to implement proper support for primary
  47. * planes, and newly merged drivers must not rely upon these transitional
  48. * helpers.
  49. *
  50. * The second part also implements transitional helpers which allow drivers to
  51. * gradually switch to the atomic helper infrastructure for plane updates. Once
  52. * that switch is complete drivers shouldn't use these any longer, instead using
  53. * the proper legacy implementations for update and disable plane hooks provided
  54. * by the atomic helpers.
  55. *
  56. * Again drivers are strongly urged to switch to the new interfaces.
  57. *
  58. * The plane helpers share the function table structures with other helpers,
  59. * specifically also the atomic helpers. See struct &drm_plane_helper_funcs for
  60. * the details.
  61. */
  62. /*
  63. * This is the minimal list of formats that seem to be safe for modeset use
  64. * with all current DRM drivers. Most hardware can actually support more
  65. * formats than this and drivers may specify a more accurate list when
  66. * creating the primary plane. However drivers that still call
  67. * drm_plane_init() will use this minimal format list as the default.
  68. */
  69. static const uint32_t safe_modeset_formats[] = {
  70. DRM_FORMAT_XRGB8888,
  71. DRM_FORMAT_ARGB8888,
  72. };
  73. /*
  74. * Returns the connectors currently associated with a CRTC. This function
  75. * should be called twice: once with a NULL connector list to retrieve
  76. * the list size, and once with the properly allocated list to be filled in.
  77. */
  78. static int get_connectors_for_crtc(struct drm_crtc *crtc,
  79. struct drm_connector **connector_list,
  80. int num_connectors)
  81. {
  82. struct drm_device *dev = crtc->dev;
  83. struct drm_connector *connector;
  84. int count = 0;
  85. /*
  86. * Note: Once we change the plane hooks to more fine-grained locking we
  87. * need to grab the connection_mutex here to be able to make these
  88. * checks.
  89. */
  90. WARN_ON(!drm_modeset_is_locked(&dev->mode_config.connection_mutex));
  91. drm_for_each_connector(connector, dev) {
  92. if (connector->encoder && connector->encoder->crtc == crtc) {
  93. if (connector_list != NULL && count < num_connectors)
  94. *(connector_list++) = connector;
  95. count++;
  96. }
  97. }
  98. return count;
  99. }
  100. /**
  101. * drm_plane_helper_check_update() - Check plane update for validity
  102. * @plane: plane object to update
  103. * @crtc: owning CRTC of owning plane
  104. * @fb: framebuffer to flip onto plane
  105. * @src: source coordinates in 16.16 fixed point
  106. * @dest: integer destination coordinates
  107. * @clip: integer clipping coordinates
  108. * @min_scale: minimum @src:@dest scaling factor in 16.16 fixed point
  109. * @max_scale: maximum @src:@dest scaling factor in 16.16 fixed point
  110. * @can_position: is it legal to position the plane such that it
  111. * doesn't cover the entire crtc? This will generally
  112. * only be false for primary planes.
  113. * @can_update_disabled: can the plane be updated while the crtc
  114. * is disabled?
  115. * @visible: output parameter indicating whether plane is still visible after
  116. * clipping
  117. *
  118. * Checks that a desired plane update is valid. Drivers that provide
  119. * their own plane handling rather than helper-provided implementations may
  120. * still wish to call this function to avoid duplication of error checking
  121. * code.
  122. *
  123. * RETURNS:
  124. * Zero if update appears valid, error code on failure
  125. */
  126. int drm_plane_helper_check_update(struct drm_plane *plane,
  127. struct drm_crtc *crtc,
  128. struct drm_framebuffer *fb,
  129. struct drm_rect *src,
  130. struct drm_rect *dest,
  131. const struct drm_rect *clip,
  132. int min_scale,
  133. int max_scale,
  134. bool can_position,
  135. bool can_update_disabled,
  136. bool *visible)
  137. {
  138. int hscale, vscale;
  139. if (!fb) {
  140. *visible = false;
  141. return 0;
  142. }
  143. /* crtc should only be NULL when disabling (i.e., !fb) */
  144. if (WARN_ON(!crtc)) {
  145. *visible = false;
  146. return 0;
  147. }
  148. if (!crtc->enabled && !can_update_disabled) {
  149. DRM_DEBUG_KMS("Cannot update plane of a disabled CRTC.\n");
  150. return -EINVAL;
  151. }
  152. /* Check scaling */
  153. hscale = drm_rect_calc_hscale(src, dest, min_scale, max_scale);
  154. vscale = drm_rect_calc_vscale(src, dest, min_scale, max_scale);
  155. if (hscale < 0 || vscale < 0) {
  156. DRM_DEBUG_KMS("Invalid scaling of plane\n");
  157. drm_rect_debug_print("src: ", src, true);
  158. drm_rect_debug_print("dst: ", dest, false);
  159. return -ERANGE;
  160. }
  161. *visible = drm_rect_clip_scaled(src, dest, clip, hscale, vscale);
  162. if (!*visible)
  163. /*
  164. * Plane isn't visible; some drivers can handle this
  165. * so we just return success here. Drivers that can't
  166. * (including those that use the primary plane helper's
  167. * update function) will return an error from their
  168. * update_plane handler.
  169. */
  170. return 0;
  171. if (!can_position && !drm_rect_equals(dest, clip)) {
  172. DRM_DEBUG_KMS("Plane must cover entire CRTC\n");
  173. drm_rect_debug_print("dst: ", dest, false);
  174. drm_rect_debug_print("clip: ", clip, false);
  175. return -EINVAL;
  176. }
  177. return 0;
  178. }
  179. EXPORT_SYMBOL(drm_plane_helper_check_update);
  180. /**
  181. * drm_primary_helper_update() - Helper for primary plane update
  182. * @plane: plane object to update
  183. * @crtc: owning CRTC of owning plane
  184. * @fb: framebuffer to flip onto plane
  185. * @crtc_x: x offset of primary plane on crtc
  186. * @crtc_y: y offset of primary plane on crtc
  187. * @crtc_w: width of primary plane rectangle on crtc
  188. * @crtc_h: height of primary plane rectangle on crtc
  189. * @src_x: x offset of @fb for panning
  190. * @src_y: y offset of @fb for panning
  191. * @src_w: width of source rectangle in @fb
  192. * @src_h: height of source rectangle in @fb
  193. *
  194. * Provides a default plane update handler for primary planes. This is handler
  195. * is called in response to a userspace SetPlane operation on the plane with a
  196. * non-NULL framebuffer. We call the driver's modeset handler to update the
  197. * framebuffer.
  198. *
  199. * SetPlane() on a primary plane of a disabled CRTC is not supported, and will
  200. * return an error.
  201. *
  202. * Note that we make some assumptions about hardware limitations that may not be
  203. * true for all hardware --
  204. *
  205. * 1. Primary plane cannot be repositioned.
  206. * 2. Primary plane cannot be scaled.
  207. * 3. Primary plane must cover the entire CRTC.
  208. * 4. Subpixel positioning is not supported.
  209. *
  210. * Drivers for hardware that don't have these restrictions can provide their
  211. * own implementation rather than using this helper.
  212. *
  213. * RETURNS:
  214. * Zero on success, error code on failure
  215. */
  216. int drm_primary_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
  217. struct drm_framebuffer *fb,
  218. int crtc_x, int crtc_y,
  219. unsigned int crtc_w, unsigned int crtc_h,
  220. uint32_t src_x, uint32_t src_y,
  221. uint32_t src_w, uint32_t src_h)
  222. {
  223. struct drm_mode_set set = {
  224. .crtc = crtc,
  225. .fb = fb,
  226. .mode = &crtc->mode,
  227. .x = src_x >> 16,
  228. .y = src_y >> 16,
  229. };
  230. struct drm_rect src = {
  231. .x1 = src_x,
  232. .y1 = src_y,
  233. .x2 = src_x + src_w,
  234. .y2 = src_y + src_h,
  235. };
  236. struct drm_rect dest = {
  237. .x1 = crtc_x,
  238. .y1 = crtc_y,
  239. .x2 = crtc_x + crtc_w,
  240. .y2 = crtc_y + crtc_h,
  241. };
  242. const struct drm_rect clip = {
  243. .x2 = crtc->mode.hdisplay,
  244. .y2 = crtc->mode.vdisplay,
  245. };
  246. struct drm_connector **connector_list;
  247. int num_connectors, ret;
  248. bool visible;
  249. ret = drm_plane_helper_check_update(plane, crtc, fb,
  250. &src, &dest, &clip,
  251. DRM_PLANE_HELPER_NO_SCALING,
  252. DRM_PLANE_HELPER_NO_SCALING,
  253. false, false, &visible);
  254. if (ret)
  255. return ret;
  256. if (!visible)
  257. /*
  258. * Primary plane isn't visible. Note that unless a driver
  259. * provides their own disable function, this will just
  260. * wind up returning -EINVAL to userspace.
  261. */
  262. return plane->funcs->disable_plane(plane);
  263. /* Find current connectors for CRTC */
  264. num_connectors = get_connectors_for_crtc(crtc, NULL, 0);
  265. BUG_ON(num_connectors == 0);
  266. connector_list = kzalloc(num_connectors * sizeof(*connector_list),
  267. GFP_KERNEL);
  268. if (!connector_list)
  269. return -ENOMEM;
  270. get_connectors_for_crtc(crtc, connector_list, num_connectors);
  271. set.connectors = connector_list;
  272. set.num_connectors = num_connectors;
  273. /*
  274. * We call set_config() directly here rather than using
  275. * drm_mode_set_config_internal. We're reprogramming the same
  276. * connectors that were already in use, so we shouldn't need the extra
  277. * cross-CRTC fb refcounting to accomodate stealing connectors.
  278. * drm_mode_setplane() already handles the basic refcounting for the
  279. * framebuffers involved in this operation.
  280. */
  281. ret = crtc->funcs->set_config(&set);
  282. kfree(connector_list);
  283. return ret;
  284. }
  285. EXPORT_SYMBOL(drm_primary_helper_update);
  286. /**
  287. * drm_primary_helper_disable() - Helper for primary plane disable
  288. * @plane: plane to disable
  289. *
  290. * Provides a default plane disable handler for primary planes. This is handler
  291. * is called in response to a userspace SetPlane operation on the plane with a
  292. * NULL framebuffer parameter. It unconditionally fails the disable call with
  293. * -EINVAL the only way to disable the primary plane without driver support is
  294. * to disable the entier CRTC. Which does not match the plane ->disable hook.
  295. *
  296. * Note that some hardware may be able to disable the primary plane without
  297. * disabling the whole CRTC. Drivers for such hardware should provide their
  298. * own disable handler that disables just the primary plane (and they'll likely
  299. * need to provide their own update handler as well to properly re-enable a
  300. * disabled primary plane).
  301. *
  302. * RETURNS:
  303. * Unconditionally returns -EINVAL.
  304. */
  305. int drm_primary_helper_disable(struct drm_plane *plane)
  306. {
  307. return -EINVAL;
  308. }
  309. EXPORT_SYMBOL(drm_primary_helper_disable);
  310. /**
  311. * drm_primary_helper_destroy() - Helper for primary plane destruction
  312. * @plane: plane to destroy
  313. *
  314. * Provides a default plane destroy handler for primary planes. This handler
  315. * is called during CRTC destruction. We disable the primary plane, remove
  316. * it from the DRM plane list, and deallocate the plane structure.
  317. */
  318. void drm_primary_helper_destroy(struct drm_plane *plane)
  319. {
  320. drm_plane_cleanup(plane);
  321. kfree(plane);
  322. }
  323. EXPORT_SYMBOL(drm_primary_helper_destroy);
  324. const struct drm_plane_funcs drm_primary_helper_funcs = {
  325. .update_plane = drm_primary_helper_update,
  326. .disable_plane = drm_primary_helper_disable,
  327. .destroy = drm_primary_helper_destroy,
  328. };
  329. EXPORT_SYMBOL(drm_primary_helper_funcs);
  330. static struct drm_plane *create_primary_plane(struct drm_device *dev)
  331. {
  332. struct drm_plane *primary;
  333. int ret;
  334. primary = kzalloc(sizeof(*primary), GFP_KERNEL);
  335. if (primary == NULL) {
  336. DRM_DEBUG_KMS("Failed to allocate primary plane\n");
  337. return NULL;
  338. }
  339. /*
  340. * Remove the format_default field from drm_plane when dropping
  341. * this helper.
  342. */
  343. primary->format_default = true;
  344. /* possible_crtc's will be filled in later by crtc_init */
  345. ret = drm_universal_plane_init(dev, primary, 0,
  346. &drm_primary_helper_funcs,
  347. safe_modeset_formats,
  348. ARRAY_SIZE(safe_modeset_formats),
  349. DRM_PLANE_TYPE_PRIMARY, NULL);
  350. if (ret) {
  351. kfree(primary);
  352. primary = NULL;
  353. }
  354. return primary;
  355. }
  356. /**
  357. * drm_crtc_init - Legacy CRTC initialization function
  358. * @dev: DRM device
  359. * @crtc: CRTC object to init
  360. * @funcs: callbacks for the new CRTC
  361. *
  362. * Initialize a CRTC object with a default helper-provided primary plane and no
  363. * cursor plane.
  364. *
  365. * Returns:
  366. * Zero on success, error code on failure.
  367. */
  368. int drm_crtc_init(struct drm_device *dev, struct drm_crtc *crtc,
  369. const struct drm_crtc_funcs *funcs)
  370. {
  371. struct drm_plane *primary;
  372. primary = create_primary_plane(dev);
  373. return drm_crtc_init_with_planes(dev, crtc, primary, NULL, funcs,
  374. NULL);
  375. }
  376. EXPORT_SYMBOL(drm_crtc_init);
  377. int drm_plane_helper_commit(struct drm_plane *plane,
  378. struct drm_plane_state *plane_state,
  379. struct drm_framebuffer *old_fb)
  380. {
  381. const struct drm_plane_helper_funcs *plane_funcs;
  382. struct drm_crtc *crtc[2];
  383. const struct drm_crtc_helper_funcs *crtc_funcs[2];
  384. int i, ret = 0;
  385. plane_funcs = plane->helper_private;
  386. /* Since this is a transitional helper we can't assume that plane->state
  387. * is always valid. Hence we need to use plane->crtc instead of
  388. * plane->state->crtc as the old crtc. */
  389. crtc[0] = plane->crtc;
  390. crtc[1] = crtc[0] != plane_state->crtc ? plane_state->crtc : NULL;
  391. for (i = 0; i < 2; i++)
  392. crtc_funcs[i] = crtc[i] ? crtc[i]->helper_private : NULL;
  393. if (plane_funcs->atomic_check) {
  394. ret = plane_funcs->atomic_check(plane, plane_state);
  395. if (ret)
  396. goto out;
  397. }
  398. if (plane_funcs->prepare_fb && plane_state->fb &&
  399. plane_state->fb != old_fb) {
  400. ret = plane_funcs->prepare_fb(plane,
  401. plane_state);
  402. if (ret)
  403. goto out;
  404. }
  405. /* Point of no return, commit sw state. */
  406. swap(plane->state, plane_state);
  407. for (i = 0; i < 2; i++) {
  408. if (crtc_funcs[i] && crtc_funcs[i]->atomic_begin)
  409. crtc_funcs[i]->atomic_begin(crtc[i], crtc[i]->state);
  410. }
  411. /*
  412. * Drivers may optionally implement the ->atomic_disable callback, so
  413. * special-case that here.
  414. */
  415. if (drm_atomic_plane_disabling(plane, plane_state) &&
  416. plane_funcs->atomic_disable)
  417. plane_funcs->atomic_disable(plane, plane_state);
  418. else
  419. plane_funcs->atomic_update(plane, plane_state);
  420. for (i = 0; i < 2; i++) {
  421. if (crtc_funcs[i] && crtc_funcs[i]->atomic_flush)
  422. crtc_funcs[i]->atomic_flush(crtc[i], crtc[i]->state);
  423. }
  424. /*
  425. * If we only moved the plane and didn't change fb's, there's no need to
  426. * wait for vblank.
  427. */
  428. if (plane->state->fb == old_fb)
  429. goto out;
  430. for (i = 0; i < 2; i++) {
  431. if (!crtc[i])
  432. continue;
  433. if (crtc[i]->cursor == plane)
  434. continue;
  435. /* There's no other way to figure out whether the crtc is running. */
  436. ret = drm_crtc_vblank_get(crtc[i]);
  437. if (ret == 0) {
  438. drm_crtc_wait_one_vblank(crtc[i]);
  439. drm_crtc_vblank_put(crtc[i]);
  440. }
  441. ret = 0;
  442. }
  443. if (plane_funcs->cleanup_fb)
  444. plane_funcs->cleanup_fb(plane, plane_state);
  445. out:
  446. if (plane_state) {
  447. if (plane->funcs->atomic_destroy_state)
  448. plane->funcs->atomic_destroy_state(plane, plane_state);
  449. else
  450. drm_atomic_helper_plane_destroy_state(plane, plane_state);
  451. }
  452. return ret;
  453. }
  454. /**
  455. * drm_plane_helper_update() - Transitional helper for plane update
  456. * @plane: plane object to update
  457. * @crtc: owning CRTC of owning plane
  458. * @fb: framebuffer to flip onto plane
  459. * @crtc_x: x offset of primary plane on crtc
  460. * @crtc_y: y offset of primary plane on crtc
  461. * @crtc_w: width of primary plane rectangle on crtc
  462. * @crtc_h: height of primary plane rectangle on crtc
  463. * @src_x: x offset of @fb for panning
  464. * @src_y: y offset of @fb for panning
  465. * @src_w: width of source rectangle in @fb
  466. * @src_h: height of source rectangle in @fb
  467. *
  468. * Provides a default plane update handler using the atomic plane update
  469. * functions. It is fully left to the driver to check plane constraints and
  470. * handle corner-cases like a fully occluded or otherwise invisible plane.
  471. *
  472. * This is useful for piecewise transitioning of a driver to the atomic helpers.
  473. *
  474. * RETURNS:
  475. * Zero on success, error code on failure
  476. */
  477. int drm_plane_helper_update(struct drm_plane *plane, struct drm_crtc *crtc,
  478. struct drm_framebuffer *fb,
  479. int crtc_x, int crtc_y,
  480. unsigned int crtc_w, unsigned int crtc_h,
  481. uint32_t src_x, uint32_t src_y,
  482. uint32_t src_w, uint32_t src_h)
  483. {
  484. struct drm_plane_state *plane_state;
  485. if (plane->funcs->atomic_duplicate_state)
  486. plane_state = plane->funcs->atomic_duplicate_state(plane);
  487. else {
  488. if (!plane->state)
  489. drm_atomic_helper_plane_reset(plane);
  490. plane_state = drm_atomic_helper_plane_duplicate_state(plane);
  491. }
  492. if (!plane_state)
  493. return -ENOMEM;
  494. plane_state->plane = plane;
  495. plane_state->crtc = crtc;
  496. drm_atomic_set_fb_for_plane(plane_state, fb);
  497. plane_state->crtc_x = crtc_x;
  498. plane_state->crtc_y = crtc_y;
  499. plane_state->crtc_h = crtc_h;
  500. plane_state->crtc_w = crtc_w;
  501. plane_state->src_x = src_x;
  502. plane_state->src_y = src_y;
  503. plane_state->src_h = src_h;
  504. plane_state->src_w = src_w;
  505. return drm_plane_helper_commit(plane, plane_state, plane->fb);
  506. }
  507. EXPORT_SYMBOL(drm_plane_helper_update);
  508. /**
  509. * drm_plane_helper_disable() - Transitional helper for plane disable
  510. * @plane: plane to disable
  511. *
  512. * Provides a default plane disable handler using the atomic plane update
  513. * functions. It is fully left to the driver to check plane constraints and
  514. * handle corner-cases like a fully occluded or otherwise invisible plane.
  515. *
  516. * This is useful for piecewise transitioning of a driver to the atomic helpers.
  517. *
  518. * RETURNS:
  519. * Zero on success, error code on failure
  520. */
  521. int drm_plane_helper_disable(struct drm_plane *plane)
  522. {
  523. struct drm_plane_state *plane_state;
  524. /* crtc helpers love to call disable functions for already disabled hw
  525. * functions. So cope with that. */
  526. if (!plane->crtc)
  527. return 0;
  528. if (plane->funcs->atomic_duplicate_state)
  529. plane_state = plane->funcs->atomic_duplicate_state(plane);
  530. else {
  531. if (!plane->state)
  532. drm_atomic_helper_plane_reset(plane);
  533. plane_state = drm_atomic_helper_plane_duplicate_state(plane);
  534. }
  535. if (!plane_state)
  536. return -ENOMEM;
  537. plane_state->plane = plane;
  538. plane_state->crtc = NULL;
  539. drm_atomic_set_fb_for_plane(plane_state, NULL);
  540. return drm_plane_helper_commit(plane, plane_state, plane->fb);
  541. }
  542. EXPORT_SYMBOL(drm_plane_helper_disable);