rcar_du_kms.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. /*
  2. * rcar_du_kms.c -- R-Car Display Unit Mode Setting
  3. *
  4. * Copyright (C) 2013-2015 Renesas Electronics Corporation
  5. *
  6. * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. */
  13. #include <drm/drmP.h>
  14. #include <drm/drm_atomic.h>
  15. #include <drm/drm_atomic_helper.h>
  16. #include <drm/drm_crtc.h>
  17. #include <drm/drm_crtc_helper.h>
  18. #include <drm/drm_fb_cma_helper.h>
  19. #include <drm/drm_gem_cma_helper.h>
  20. #include <linux/of_graph.h>
  21. #include <linux/wait.h>
  22. #include "rcar_du_crtc.h"
  23. #include "rcar_du_drv.h"
  24. #include "rcar_du_encoder.h"
  25. #include "rcar_du_kms.h"
  26. #include "rcar_du_lvdsenc.h"
  27. #include "rcar_du_regs.h"
  28. #include "rcar_du_vsp.h"
  29. /* -----------------------------------------------------------------------------
  30. * Format helpers
  31. */
  32. static const struct rcar_du_format_info rcar_du_format_infos[] = {
  33. {
  34. .fourcc = DRM_FORMAT_RGB565,
  35. .bpp = 16,
  36. .planes = 1,
  37. .pnmr = PnMR_SPIM_TP | PnMR_DDDF_16BPP,
  38. .edf = PnDDCR4_EDF_NONE,
  39. }, {
  40. .fourcc = DRM_FORMAT_ARGB1555,
  41. .bpp = 16,
  42. .planes = 1,
  43. .pnmr = PnMR_SPIM_ALP | PnMR_DDDF_ARGB,
  44. .edf = PnDDCR4_EDF_NONE,
  45. }, {
  46. .fourcc = DRM_FORMAT_XRGB1555,
  47. .bpp = 16,
  48. .planes = 1,
  49. .pnmr = PnMR_SPIM_ALP | PnMR_DDDF_ARGB,
  50. .edf = PnDDCR4_EDF_NONE,
  51. }, {
  52. .fourcc = DRM_FORMAT_XRGB8888,
  53. .bpp = 32,
  54. .planes = 1,
  55. .pnmr = PnMR_SPIM_TP | PnMR_DDDF_16BPP,
  56. .edf = PnDDCR4_EDF_RGB888,
  57. }, {
  58. .fourcc = DRM_FORMAT_ARGB8888,
  59. .bpp = 32,
  60. .planes = 1,
  61. .pnmr = PnMR_SPIM_ALP | PnMR_DDDF_16BPP,
  62. .edf = PnDDCR4_EDF_ARGB8888,
  63. }, {
  64. .fourcc = DRM_FORMAT_UYVY,
  65. .bpp = 16,
  66. .planes = 1,
  67. .pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
  68. .edf = PnDDCR4_EDF_NONE,
  69. }, {
  70. .fourcc = DRM_FORMAT_YUYV,
  71. .bpp = 16,
  72. .planes = 1,
  73. .pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
  74. .edf = PnDDCR4_EDF_NONE,
  75. }, {
  76. .fourcc = DRM_FORMAT_NV12,
  77. .bpp = 12,
  78. .planes = 2,
  79. .pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
  80. .edf = PnDDCR4_EDF_NONE,
  81. }, {
  82. .fourcc = DRM_FORMAT_NV21,
  83. .bpp = 12,
  84. .planes = 2,
  85. .pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
  86. .edf = PnDDCR4_EDF_NONE,
  87. }, {
  88. .fourcc = DRM_FORMAT_NV16,
  89. .bpp = 16,
  90. .planes = 2,
  91. .pnmr = PnMR_SPIM_TP_OFF | PnMR_DDDF_YC,
  92. .edf = PnDDCR4_EDF_NONE,
  93. },
  94. /* The following formats are not supported on Gen2 and thus have no
  95. * associated .pnmr or .edf settings.
  96. */
  97. {
  98. .fourcc = DRM_FORMAT_NV61,
  99. .bpp = 16,
  100. .planes = 2,
  101. }, {
  102. .fourcc = DRM_FORMAT_YUV420,
  103. .bpp = 12,
  104. .planes = 3,
  105. }, {
  106. .fourcc = DRM_FORMAT_YVU420,
  107. .bpp = 12,
  108. .planes = 3,
  109. }, {
  110. .fourcc = DRM_FORMAT_YUV422,
  111. .bpp = 16,
  112. .planes = 3,
  113. }, {
  114. .fourcc = DRM_FORMAT_YVU422,
  115. .bpp = 16,
  116. .planes = 3,
  117. }, {
  118. .fourcc = DRM_FORMAT_YUV444,
  119. .bpp = 24,
  120. .planes = 3,
  121. }, {
  122. .fourcc = DRM_FORMAT_YVU444,
  123. .bpp = 24,
  124. .planes = 3,
  125. },
  126. };
  127. const struct rcar_du_format_info *rcar_du_format_info(u32 fourcc)
  128. {
  129. unsigned int i;
  130. for (i = 0; i < ARRAY_SIZE(rcar_du_format_infos); ++i) {
  131. if (rcar_du_format_infos[i].fourcc == fourcc)
  132. return &rcar_du_format_infos[i];
  133. }
  134. return NULL;
  135. }
  136. /* -----------------------------------------------------------------------------
  137. * Frame buffer
  138. */
  139. int rcar_du_dumb_create(struct drm_file *file, struct drm_device *dev,
  140. struct drm_mode_create_dumb *args)
  141. {
  142. struct rcar_du_device *rcdu = dev->dev_private;
  143. unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8);
  144. unsigned int align;
  145. /* The R8A7779 DU requires a 16 pixels pitch alignment as documented,
  146. * but the R8A7790 DU seems to require a 128 bytes pitch alignment.
  147. */
  148. if (rcar_du_needs(rcdu, RCAR_DU_QUIRK_ALIGN_128B))
  149. align = 128;
  150. else
  151. align = 16 * args->bpp / 8;
  152. args->pitch = roundup(min_pitch, align);
  153. return drm_gem_cma_dumb_create_internal(file, dev, args);
  154. }
  155. static struct drm_framebuffer *
  156. rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
  157. const struct drm_mode_fb_cmd2 *mode_cmd)
  158. {
  159. struct rcar_du_device *rcdu = dev->dev_private;
  160. const struct rcar_du_format_info *format;
  161. unsigned int max_pitch;
  162. unsigned int align;
  163. unsigned int bpp;
  164. unsigned int i;
  165. format = rcar_du_format_info(mode_cmd->pixel_format);
  166. if (format == NULL) {
  167. dev_dbg(dev->dev, "unsupported pixel format %08x\n",
  168. mode_cmd->pixel_format);
  169. return ERR_PTR(-EINVAL);
  170. }
  171. /*
  172. * The pitch and alignment constraints are expressed in pixels on the
  173. * hardware side and in bytes in the DRM API.
  174. */
  175. bpp = format->planes == 1 ? format->bpp / 8 : 1;
  176. max_pitch = 4096 * bpp;
  177. if (rcar_du_needs(rcdu, RCAR_DU_QUIRK_ALIGN_128B))
  178. align = 128;
  179. else
  180. align = 16 * bpp;
  181. if (mode_cmd->pitches[0] & (align - 1) ||
  182. mode_cmd->pitches[0] >= max_pitch) {
  183. dev_dbg(dev->dev, "invalid pitch value %u\n",
  184. mode_cmd->pitches[0]);
  185. return ERR_PTR(-EINVAL);
  186. }
  187. for (i = 1; i < format->planes; ++i) {
  188. if (mode_cmd->pitches[i] != mode_cmd->pitches[0]) {
  189. dev_dbg(dev->dev,
  190. "luma and chroma pitches do not match\n");
  191. return ERR_PTR(-EINVAL);
  192. }
  193. }
  194. return drm_fb_cma_create(dev, file_priv, mode_cmd);
  195. }
  196. static void rcar_du_output_poll_changed(struct drm_device *dev)
  197. {
  198. struct rcar_du_device *rcdu = dev->dev_private;
  199. drm_fbdev_cma_hotplug_event(rcdu->fbdev);
  200. }
  201. /* -----------------------------------------------------------------------------
  202. * Atomic Check and Update
  203. */
  204. static int rcar_du_atomic_check(struct drm_device *dev,
  205. struct drm_atomic_state *state)
  206. {
  207. struct rcar_du_device *rcdu = dev->dev_private;
  208. int ret;
  209. ret = drm_atomic_helper_check(dev, state);
  210. if (ret < 0)
  211. return ret;
  212. if (rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE))
  213. return 0;
  214. return rcar_du_atomic_check_planes(dev, state);
  215. }
  216. struct rcar_du_commit {
  217. struct work_struct work;
  218. struct drm_device *dev;
  219. struct drm_atomic_state *state;
  220. u32 crtcs;
  221. };
  222. static void rcar_du_atomic_complete(struct rcar_du_commit *commit)
  223. {
  224. struct drm_device *dev = commit->dev;
  225. struct rcar_du_device *rcdu = dev->dev_private;
  226. struct drm_atomic_state *old_state = commit->state;
  227. /* Apply the atomic update. */
  228. drm_atomic_helper_commit_modeset_disables(dev, old_state);
  229. drm_atomic_helper_commit_modeset_enables(dev, old_state);
  230. drm_atomic_helper_commit_planes(dev, old_state, true);
  231. drm_atomic_helper_wait_for_vblanks(dev, old_state);
  232. drm_atomic_helper_cleanup_planes(dev, old_state);
  233. drm_atomic_state_free(old_state);
  234. /* Complete the commit, wake up any waiter. */
  235. spin_lock(&rcdu->commit.wait.lock);
  236. rcdu->commit.pending &= ~commit->crtcs;
  237. wake_up_all_locked(&rcdu->commit.wait);
  238. spin_unlock(&rcdu->commit.wait.lock);
  239. kfree(commit);
  240. }
  241. static void rcar_du_atomic_work(struct work_struct *work)
  242. {
  243. struct rcar_du_commit *commit =
  244. container_of(work, struct rcar_du_commit, work);
  245. rcar_du_atomic_complete(commit);
  246. }
  247. static int rcar_du_atomic_commit(struct drm_device *dev,
  248. struct drm_atomic_state *state,
  249. bool nonblock)
  250. {
  251. struct rcar_du_device *rcdu = dev->dev_private;
  252. struct rcar_du_commit *commit;
  253. struct drm_crtc *crtc;
  254. struct drm_crtc_state *crtc_state;
  255. unsigned int i;
  256. int ret;
  257. ret = drm_atomic_helper_prepare_planes(dev, state);
  258. if (ret)
  259. return ret;
  260. /* Allocate the commit object. */
  261. commit = kzalloc(sizeof(*commit), GFP_KERNEL);
  262. if (commit == NULL) {
  263. ret = -ENOMEM;
  264. goto error;
  265. }
  266. INIT_WORK(&commit->work, rcar_du_atomic_work);
  267. commit->dev = dev;
  268. commit->state = state;
  269. /* Wait until all affected CRTCs have completed previous commits and
  270. * mark them as pending.
  271. */
  272. for_each_crtc_in_state(state, crtc, crtc_state, i)
  273. commit->crtcs |= drm_crtc_mask(crtc);
  274. spin_lock(&rcdu->commit.wait.lock);
  275. ret = wait_event_interruptible_locked(rcdu->commit.wait,
  276. !(rcdu->commit.pending & commit->crtcs));
  277. if (ret == 0)
  278. rcdu->commit.pending |= commit->crtcs;
  279. spin_unlock(&rcdu->commit.wait.lock);
  280. if (ret) {
  281. kfree(commit);
  282. goto error;
  283. }
  284. /* Swap the state, this is the point of no return. */
  285. drm_atomic_helper_swap_state(state, true);
  286. if (nonblock)
  287. schedule_work(&commit->work);
  288. else
  289. rcar_du_atomic_complete(commit);
  290. return 0;
  291. error:
  292. drm_atomic_helper_cleanup_planes(dev, state);
  293. return ret;
  294. }
  295. /* -----------------------------------------------------------------------------
  296. * Initialization
  297. */
  298. static const struct drm_mode_config_funcs rcar_du_mode_config_funcs = {
  299. .fb_create = rcar_du_fb_create,
  300. .output_poll_changed = rcar_du_output_poll_changed,
  301. .atomic_check = rcar_du_atomic_check,
  302. .atomic_commit = rcar_du_atomic_commit,
  303. };
  304. static int rcar_du_encoders_init_one(struct rcar_du_device *rcdu,
  305. enum rcar_du_output output,
  306. struct of_endpoint *ep)
  307. {
  308. static const struct {
  309. const char *compatible;
  310. enum rcar_du_encoder_type type;
  311. } encoders[] = {
  312. { "adi,adv7123", RCAR_DU_ENCODER_VGA },
  313. { "adi,adv7511w", RCAR_DU_ENCODER_HDMI },
  314. { "thine,thc63lvdm83d", RCAR_DU_ENCODER_LVDS },
  315. };
  316. enum rcar_du_encoder_type enc_type = RCAR_DU_ENCODER_NONE;
  317. struct device_node *connector = NULL;
  318. struct device_node *encoder = NULL;
  319. struct device_node *ep_node = NULL;
  320. struct device_node *entity_ep_node;
  321. struct device_node *entity;
  322. int ret;
  323. /*
  324. * Locate the connected entity and infer its type from the number of
  325. * endpoints.
  326. */
  327. entity = of_graph_get_remote_port_parent(ep->local_node);
  328. if (!entity) {
  329. dev_dbg(rcdu->dev, "unconnected endpoint %s, skipping\n",
  330. ep->local_node->full_name);
  331. return -ENODEV;
  332. }
  333. entity_ep_node = of_parse_phandle(ep->local_node, "remote-endpoint", 0);
  334. for_each_endpoint_of_node(entity, ep_node) {
  335. if (ep_node == entity_ep_node)
  336. continue;
  337. /*
  338. * We've found one endpoint other than the input, this must
  339. * be an encoder. Locate the connector.
  340. */
  341. encoder = entity;
  342. connector = of_graph_get_remote_port_parent(ep_node);
  343. of_node_put(ep_node);
  344. if (!connector) {
  345. dev_warn(rcdu->dev,
  346. "no connector for encoder %s, skipping\n",
  347. encoder->full_name);
  348. of_node_put(entity_ep_node);
  349. of_node_put(encoder);
  350. return -ENODEV;
  351. }
  352. break;
  353. }
  354. of_node_put(entity_ep_node);
  355. if (encoder) {
  356. /*
  357. * If an encoder has been found, get its type based on its
  358. * compatible string.
  359. */
  360. unsigned int i;
  361. for (i = 0; i < ARRAY_SIZE(encoders); ++i) {
  362. if (of_device_is_compatible(encoder,
  363. encoders[i].compatible)) {
  364. enc_type = encoders[i].type;
  365. break;
  366. }
  367. }
  368. if (i == ARRAY_SIZE(encoders)) {
  369. dev_warn(rcdu->dev,
  370. "unknown encoder type for %s, skipping\n",
  371. encoder->full_name);
  372. of_node_put(encoder);
  373. of_node_put(connector);
  374. return -EINVAL;
  375. }
  376. } else {
  377. /*
  378. * If no encoder has been found the entity must be the
  379. * connector.
  380. */
  381. connector = entity;
  382. }
  383. ret = rcar_du_encoder_init(rcdu, enc_type, output, encoder, connector);
  384. of_node_put(encoder);
  385. of_node_put(connector);
  386. if (ret && ret != -EPROBE_DEFER)
  387. dev_warn(rcdu->dev,
  388. "failed to initialize encoder %s (%d), skipping\n",
  389. encoder->full_name, ret);
  390. return ret;
  391. }
  392. static int rcar_du_encoders_init(struct rcar_du_device *rcdu)
  393. {
  394. struct device_node *np = rcdu->dev->of_node;
  395. struct device_node *ep_node;
  396. unsigned int num_encoders = 0;
  397. /*
  398. * Iterate over the endpoints and create one encoder for each output
  399. * pipeline.
  400. */
  401. for_each_endpoint_of_node(np, ep_node) {
  402. enum rcar_du_output output;
  403. struct of_endpoint ep;
  404. unsigned int i;
  405. int ret;
  406. ret = of_graph_parse_endpoint(ep_node, &ep);
  407. if (ret < 0) {
  408. of_node_put(ep_node);
  409. return ret;
  410. }
  411. /* Find the output route corresponding to the port number. */
  412. for (i = 0; i < RCAR_DU_OUTPUT_MAX; ++i) {
  413. if (rcdu->info->routes[i].possible_crtcs &&
  414. rcdu->info->routes[i].port == ep.port) {
  415. output = i;
  416. break;
  417. }
  418. }
  419. if (i == RCAR_DU_OUTPUT_MAX) {
  420. dev_warn(rcdu->dev,
  421. "port %u references unexisting output, skipping\n",
  422. ep.port);
  423. continue;
  424. }
  425. /* Process the output pipeline. */
  426. ret = rcar_du_encoders_init_one(rcdu, output, &ep);
  427. if (ret < 0) {
  428. if (ret == -EPROBE_DEFER) {
  429. of_node_put(ep_node);
  430. return ret;
  431. }
  432. continue;
  433. }
  434. num_encoders++;
  435. }
  436. return num_encoders;
  437. }
  438. static int rcar_du_properties_init(struct rcar_du_device *rcdu)
  439. {
  440. rcdu->props.alpha =
  441. drm_property_create_range(rcdu->ddev, 0, "alpha", 0, 255);
  442. if (rcdu->props.alpha == NULL)
  443. return -ENOMEM;
  444. /* The color key is expressed as an RGB888 triplet stored in a 32-bit
  445. * integer in XRGB8888 format. Bit 24 is used as a flag to disable (0)
  446. * or enable source color keying (1).
  447. */
  448. rcdu->props.colorkey =
  449. drm_property_create_range(rcdu->ddev, 0, "colorkey",
  450. 0, 0x01ffffff);
  451. if (rcdu->props.colorkey == NULL)
  452. return -ENOMEM;
  453. return 0;
  454. }
  455. int rcar_du_modeset_init(struct rcar_du_device *rcdu)
  456. {
  457. static const unsigned int mmio_offsets[] = {
  458. DU0_REG_OFFSET, DU2_REG_OFFSET
  459. };
  460. struct drm_device *dev = rcdu->ddev;
  461. struct drm_encoder *encoder;
  462. struct drm_fbdev_cma *fbdev;
  463. unsigned int num_encoders;
  464. unsigned int num_groups;
  465. unsigned int i;
  466. int ret;
  467. drm_mode_config_init(dev);
  468. dev->mode_config.min_width = 0;
  469. dev->mode_config.min_height = 0;
  470. dev->mode_config.max_width = 4095;
  471. dev->mode_config.max_height = 2047;
  472. dev->mode_config.funcs = &rcar_du_mode_config_funcs;
  473. rcdu->num_crtcs = rcdu->info->num_crtcs;
  474. ret = rcar_du_properties_init(rcdu);
  475. if (ret < 0)
  476. return ret;
  477. /* Initialize the groups. */
  478. num_groups = DIV_ROUND_UP(rcdu->num_crtcs, 2);
  479. for (i = 0; i < num_groups; ++i) {
  480. struct rcar_du_group *rgrp = &rcdu->groups[i];
  481. mutex_init(&rgrp->lock);
  482. rgrp->dev = rcdu;
  483. rgrp->mmio_offset = mmio_offsets[i];
  484. rgrp->index = i;
  485. rgrp->num_crtcs = min(rcdu->num_crtcs - 2 * i, 2U);
  486. /* If we have more than one CRTCs in this group pre-associate
  487. * the low-order planes with CRTC 0 and the high-order planes
  488. * with CRTC 1 to minimize flicker occurring when the
  489. * association is changed.
  490. */
  491. rgrp->dptsr_planes = rgrp->num_crtcs > 1
  492. ? (rcdu->info->gen >= 3 ? 0x04 : 0xf0)
  493. : 0;
  494. if (!rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE)) {
  495. ret = rcar_du_planes_init(rgrp);
  496. if (ret < 0)
  497. return ret;
  498. }
  499. }
  500. /* Initialize the compositors. */
  501. if (rcar_du_has(rcdu, RCAR_DU_FEATURE_VSP1_SOURCE)) {
  502. for (i = 0; i < rcdu->num_crtcs; ++i) {
  503. struct rcar_du_vsp *vsp = &rcdu->vsps[i];
  504. vsp->index = i;
  505. vsp->dev = rcdu;
  506. rcdu->crtcs[i].vsp = vsp;
  507. ret = rcar_du_vsp_init(vsp);
  508. if (ret < 0)
  509. return ret;
  510. }
  511. }
  512. /* Create the CRTCs. */
  513. for (i = 0; i < rcdu->num_crtcs; ++i) {
  514. struct rcar_du_group *rgrp = &rcdu->groups[i / 2];
  515. ret = rcar_du_crtc_create(rgrp, i);
  516. if (ret < 0)
  517. return ret;
  518. }
  519. /* Initialize the encoders. */
  520. ret = rcar_du_lvdsenc_init(rcdu);
  521. if (ret < 0)
  522. return ret;
  523. ret = rcar_du_encoders_init(rcdu);
  524. if (ret < 0)
  525. return ret;
  526. if (ret == 0) {
  527. dev_err(rcdu->dev, "error: no encoder could be initialized\n");
  528. return -EINVAL;
  529. }
  530. num_encoders = ret;
  531. /* Set the possible CRTCs and possible clones. There's always at least
  532. * one way for all encoders to clone each other, set all bits in the
  533. * possible clones field.
  534. */
  535. list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) {
  536. struct rcar_du_encoder *renc = to_rcar_encoder(encoder);
  537. const struct rcar_du_output_routing *route =
  538. &rcdu->info->routes[renc->output];
  539. encoder->possible_crtcs = route->possible_crtcs;
  540. encoder->possible_clones = (1 << num_encoders) - 1;
  541. }
  542. drm_mode_config_reset(dev);
  543. drm_kms_helper_poll_init(dev);
  544. if (dev->mode_config.num_connector) {
  545. fbdev = drm_fbdev_cma_init(dev, 32, dev->mode_config.num_crtc,
  546. dev->mode_config.num_connector);
  547. if (IS_ERR(fbdev))
  548. return PTR_ERR(fbdev);
  549. rcdu->fbdev = fbdev;
  550. } else {
  551. dev_info(rcdu->dev,
  552. "no connector found, disabling fbdev emulation\n");
  553. }
  554. return 0;
  555. }