]> Git Repo - linux.git/blob - drivers/gpu/drm/panel/panel-simple.c
Merge tag 'drm-intel-next-2021-01-04' of git://anongit.freedesktop.org/drm/drm-intel...
[linux.git] / drivers / gpu / drm / panel / panel-simple.c
1 /*
2  * Copyright (C) 2013, NVIDIA Corporation.  All rights reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the "Software"),
6  * to deal in the Software without restriction, including without limitation
7  * the rights to use, copy, modify, merge, publish, distribute, sub license,
8  * and/or sell copies of the Software, and to permit persons to whom the
9  * Software is furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice (including the
12  * next paragraph) shall be included in all copies or substantial portions
13  * of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23
24 #include <linux/delay.h>
25 #include <linux/gpio/consumer.h>
26 #include <linux/iopoll.h>
27 #include <linux/module.h>
28 #include <linux/of_platform.h>
29 #include <linux/platform_device.h>
30 #include <linux/regulator/consumer.h>
31
32 #include <video/display_timing.h>
33 #include <video/of_display_timing.h>
34 #include <video/videomode.h>
35
36 #include <drm/drm_crtc.h>
37 #include <drm/drm_device.h>
38 #include <drm/drm_mipi_dsi.h>
39 #include <drm/drm_panel.h>
40
41 /**
42  * struct panel_desc - Describes a simple panel.
43  */
44 struct panel_desc {
45         /**
46          * @modes: Pointer to array of fixed modes appropriate for this panel.
47          *
48          * If only one mode then this can just be the address of the mode.
49          * NOTE: cannot be used with "timings" and also if this is specified
50          * then you cannot override the mode in the device tree.
51          */
52         const struct drm_display_mode *modes;
53
54         /** @num_modes: Number of elements in modes array. */
55         unsigned int num_modes;
56
57         /**
58          * @timings: Pointer to array of display timings
59          *
60          * NOTE: cannot be used with "modes" and also these will be used to
61          * validate a device tree override if one is present.
62          */
63         const struct display_timing *timings;
64
65         /** @num_timings: Number of elements in timings array. */
66         unsigned int num_timings;
67
68         /** @bpc: Bits per color. */
69         unsigned int bpc;
70
71         /** @size: Structure containing the physical size of this panel. */
72         struct {
73                 /**
74                  * @size.width: Width (in mm) of the active display area.
75                  */
76                 unsigned int width;
77
78                 /**
79                  * @size.height: Height (in mm) of the active display area.
80                  */
81                 unsigned int height;
82         } size;
83
84         /** @delay: Structure containing various delay values for this panel. */
85         struct {
86                 /**
87                  * @delay.prepare: Time for the panel to become ready.
88                  *
89                  * The time (in milliseconds) that it takes for the panel to
90                  * become ready and start receiving video data
91                  */
92                 unsigned int prepare;
93
94                 /**
95                  * @delay.hpd_absent_delay: Time to wait if HPD isn't hooked up.
96                  *
97                  * Add this to the prepare delay if we know Hot Plug Detect
98                  * isn't used.
99                  */
100                 unsigned int hpd_absent_delay;
101
102                 /**
103                  * @delay.prepare_to_enable: Time between prepare and enable.
104                  *
105                  * The minimum time, in milliseconds, that needs to have passed
106                  * between when prepare finished and enable may begin. If at
107                  * enable time less time has passed since prepare finished,
108                  * the driver waits for the remaining time.
109                  *
110                  * If a fixed enable delay is also specified, we'll start
111                  * counting before delaying for the fixed delay.
112                  *
113                  * If a fixed prepare delay is also specified, we won't start
114                  * counting until after the fixed delay. We can't overlap this
115                  * fixed delay with the min time because the fixed delay
116                  * doesn't happen at the end of the function if a HPD GPIO was
117                  * specified.
118                  *
119                  * In other words:
120                  *   prepare()
121                  *     ...
122                  *     // do fixed prepare delay
123                  *     // wait for HPD GPIO if applicable
124                  *     // start counting for prepare_to_enable
125                  *
126                  *   enable()
127                  *     // do fixed enable delay
128                  *     // enforce prepare_to_enable min time
129                  */
130                 unsigned int prepare_to_enable;
131
132                 /**
133                  * @delay.enable: Time for the panel to display a valid frame.
134                  *
135                  * The time (in milliseconds) that it takes for the panel to
136                  * display the first valid frame after starting to receive
137                  * video data.
138                  */
139                 unsigned int enable;
140
141                 /**
142                  * @delay.disable: Time for the panel to turn the display off.
143                  *
144                  * The time (in milliseconds) that it takes for the panel to
145                  * turn the display off (no content is visible).
146                  */
147                 unsigned int disable;
148
149                 /**
150                  * @delay.unprepare: Time to power down completely.
151                  *
152                  * The time (in milliseconds) that it takes for the panel
153                  * to power itself down completely.
154                  *
155                  * This time is used to prevent a future "prepare" from
156                  * starting until at least this many milliseconds has passed.
157                  * If at prepare time less time has passed since unprepare
158                  * finished, the driver waits for the remaining time.
159                  */
160                 unsigned int unprepare;
161         } delay;
162
163         /** @bus_format: See MEDIA_BUS_FMT_... defines. */
164         u32 bus_format;
165
166         /** @bus_flags: See DRM_BUS_FLAG_... defines. */
167         u32 bus_flags;
168
169         /** @connector_type: LVDS, eDP, DSI, DPI, etc. */
170         int connector_type;
171 };
172
173 struct panel_simple {
174         struct drm_panel base;
175         bool enabled;
176         bool no_hpd;
177
178         ktime_t prepared_time;
179         ktime_t unprepared_time;
180
181         const struct panel_desc *desc;
182
183         struct regulator *supply;
184         struct i2c_adapter *ddc;
185
186         struct gpio_desc *enable_gpio;
187         struct gpio_desc *hpd_gpio;
188
189         struct drm_display_mode override_mode;
190
191         enum drm_panel_orientation orientation;
192 };
193
194 static inline struct panel_simple *to_panel_simple(struct drm_panel *panel)
195 {
196         return container_of(panel, struct panel_simple, base);
197 }
198
199 static unsigned int panel_simple_get_timings_modes(struct panel_simple *panel,
200                                                    struct drm_connector *connector)
201 {
202         struct drm_display_mode *mode;
203         unsigned int i, num = 0;
204
205         for (i = 0; i < panel->desc->num_timings; i++) {
206                 const struct display_timing *dt = &panel->desc->timings[i];
207                 struct videomode vm;
208
209                 videomode_from_timing(dt, &vm);
210                 mode = drm_mode_create(connector->dev);
211                 if (!mode) {
212                         dev_err(panel->base.dev, "failed to add mode %ux%u\n",
213                                 dt->hactive.typ, dt->vactive.typ);
214                         continue;
215                 }
216
217                 drm_display_mode_from_videomode(&vm, mode);
218
219                 mode->type |= DRM_MODE_TYPE_DRIVER;
220
221                 if (panel->desc->num_timings == 1)
222                         mode->type |= DRM_MODE_TYPE_PREFERRED;
223
224                 drm_mode_probed_add(connector, mode);
225                 num++;
226         }
227
228         return num;
229 }
230
231 static unsigned int panel_simple_get_display_modes(struct panel_simple *panel,
232                                                    struct drm_connector *connector)
233 {
234         struct drm_display_mode *mode;
235         unsigned int i, num = 0;
236
237         for (i = 0; i < panel->desc->num_modes; i++) {
238                 const struct drm_display_mode *m = &panel->desc->modes[i];
239
240                 mode = drm_mode_duplicate(connector->dev, m);
241                 if (!mode) {
242                         dev_err(panel->base.dev, "failed to add mode %ux%u@%u\n",
243                                 m->hdisplay, m->vdisplay,
244                                 drm_mode_vrefresh(m));
245                         continue;
246                 }
247
248                 mode->type |= DRM_MODE_TYPE_DRIVER;
249
250                 if (panel->desc->num_modes == 1)
251                         mode->type |= DRM_MODE_TYPE_PREFERRED;
252
253                 drm_mode_set_name(mode);
254
255                 drm_mode_probed_add(connector, mode);
256                 num++;
257         }
258
259         return num;
260 }
261
262 static int panel_simple_get_non_edid_modes(struct panel_simple *panel,
263                                            struct drm_connector *connector)
264 {
265         struct drm_display_mode *mode;
266         bool has_override = panel->override_mode.type;
267         unsigned int num = 0;
268
269         if (!panel->desc)
270                 return 0;
271
272         if (has_override) {
273                 mode = drm_mode_duplicate(connector->dev,
274                                           &panel->override_mode);
275                 if (mode) {
276                         drm_mode_probed_add(connector, mode);
277                         num = 1;
278                 } else {
279                         dev_err(panel->base.dev, "failed to add override mode\n");
280                 }
281         }
282
283         /* Only add timings if override was not there or failed to validate */
284         if (num == 0 && panel->desc->num_timings)
285                 num = panel_simple_get_timings_modes(panel, connector);
286
287         /*
288          * Only add fixed modes if timings/override added no mode.
289          *
290          * We should only ever have either the display timings specified
291          * or a fixed mode. Anything else is rather bogus.
292          */
293         WARN_ON(panel->desc->num_timings && panel->desc->num_modes);
294         if (num == 0)
295                 num = panel_simple_get_display_modes(panel, connector);
296
297         connector->display_info.bpc = panel->desc->bpc;
298         connector->display_info.width_mm = panel->desc->size.width;
299         connector->display_info.height_mm = panel->desc->size.height;
300         if (panel->desc->bus_format)
301                 drm_display_info_set_bus_formats(&connector->display_info,
302                                                  &panel->desc->bus_format, 1);
303         connector->display_info.bus_flags = panel->desc->bus_flags;
304
305         return num;
306 }
307
308 static void panel_simple_wait(ktime_t start_ktime, unsigned int min_ms)
309 {
310         ktime_t now_ktime, min_ktime;
311
312         if (!min_ms)
313                 return;
314
315         min_ktime = ktime_add(start_ktime, ms_to_ktime(min_ms));
316         now_ktime = ktime_get();
317
318         if (ktime_before(now_ktime, min_ktime))
319                 msleep(ktime_to_ms(ktime_sub(min_ktime, now_ktime)) + 1);
320 }
321
322 static int panel_simple_disable(struct drm_panel *panel)
323 {
324         struct panel_simple *p = to_panel_simple(panel);
325
326         if (!p->enabled)
327                 return 0;
328
329         if (p->desc->delay.disable)
330                 msleep(p->desc->delay.disable);
331
332         p->enabled = false;
333
334         return 0;
335 }
336
337 static int panel_simple_unprepare(struct drm_panel *panel)
338 {
339         struct panel_simple *p = to_panel_simple(panel);
340
341         if (p->prepared_time == 0)
342                 return 0;
343
344         gpiod_set_value_cansleep(p->enable_gpio, 0);
345
346         regulator_disable(p->supply);
347
348         p->prepared_time = 0;
349         p->unprepared_time = ktime_get();
350
351         return 0;
352 }
353
354 static int panel_simple_get_hpd_gpio(struct device *dev,
355                                      struct panel_simple *p, bool from_probe)
356 {
357         int err;
358
359         p->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
360         if (IS_ERR(p->hpd_gpio)) {
361                 err = PTR_ERR(p->hpd_gpio);
362
363                 /*
364                  * If we're called from probe we won't consider '-EPROBE_DEFER'
365                  * to be an error--we'll leave the error code in "hpd_gpio".
366                  * When we try to use it we'll try again.  This allows for
367                  * circular dependencies where the component providing the
368                  * hpd gpio needs the panel to init before probing.
369                  */
370                 if (err != -EPROBE_DEFER || !from_probe) {
371                         dev_err(dev, "failed to get 'hpd' GPIO: %d\n", err);
372                         return err;
373                 }
374         }
375
376         return 0;
377 }
378
379 static int panel_simple_prepare(struct drm_panel *panel)
380 {
381         struct panel_simple *p = to_panel_simple(panel);
382         unsigned int delay;
383         int err;
384         int hpd_asserted;
385
386         if (p->prepared_time != 0)
387                 return 0;
388
389         panel_simple_wait(p->unprepared_time, p->desc->delay.unprepare);
390
391         err = regulator_enable(p->supply);
392         if (err < 0) {
393                 dev_err(panel->dev, "failed to enable supply: %d\n", err);
394                 return err;
395         }
396
397         gpiod_set_value_cansleep(p->enable_gpio, 1);
398
399         delay = p->desc->delay.prepare;
400         if (p->no_hpd)
401                 delay += p->desc->delay.hpd_absent_delay;
402         if (delay)
403                 msleep(delay);
404
405         if (p->hpd_gpio) {
406                 if (IS_ERR(p->hpd_gpio)) {
407                         err = panel_simple_get_hpd_gpio(panel->dev, p, false);
408                         if (err)
409                                 return err;
410                 }
411
412                 err = readx_poll_timeout(gpiod_get_value_cansleep, p->hpd_gpio,
413                                          hpd_asserted, hpd_asserted,
414                                          1000, 2000000);
415                 if (hpd_asserted < 0)
416                         err = hpd_asserted;
417
418                 if (err) {
419                         dev_err(panel->dev,
420                                 "error waiting for hpd GPIO: %d\n", err);
421                         return err;
422                 }
423         }
424
425         p->prepared_time = ktime_get();
426
427         return 0;
428 }
429
430 static int panel_simple_enable(struct drm_panel *panel)
431 {
432         struct panel_simple *p = to_panel_simple(panel);
433
434         if (p->enabled)
435                 return 0;
436
437         if (p->desc->delay.enable)
438                 msleep(p->desc->delay.enable);
439
440         panel_simple_wait(p->prepared_time, p->desc->delay.prepare_to_enable);
441
442         p->enabled = true;
443
444         return 0;
445 }
446
447 static int panel_simple_get_modes(struct drm_panel *panel,
448                                   struct drm_connector *connector)
449 {
450         struct panel_simple *p = to_panel_simple(panel);
451         int num = 0;
452
453         /* probe EDID if a DDC bus is available */
454         if (p->ddc) {
455                 struct edid *edid = drm_get_edid(connector, p->ddc);
456
457                 drm_connector_update_edid_property(connector, edid);
458                 if (edid) {
459                         num += drm_add_edid_modes(connector, edid);
460                         kfree(edid);
461                 }
462         }
463
464         /* add hard-coded panel modes */
465         num += panel_simple_get_non_edid_modes(p, connector);
466
467         /* set up connector's "panel orientation" property */
468         drm_connector_set_panel_orientation(connector, p->orientation);
469
470         return num;
471 }
472
473 static int panel_simple_get_timings(struct drm_panel *panel,
474                                     unsigned int num_timings,
475                                     struct display_timing *timings)
476 {
477         struct panel_simple *p = to_panel_simple(panel);
478         unsigned int i;
479
480         if (p->desc->num_timings < num_timings)
481                 num_timings = p->desc->num_timings;
482
483         if (timings)
484                 for (i = 0; i < num_timings; i++)
485                         timings[i] = p->desc->timings[i];
486
487         return p->desc->num_timings;
488 }
489
490 static const struct drm_panel_funcs panel_simple_funcs = {
491         .disable = panel_simple_disable,
492         .unprepare = panel_simple_unprepare,
493         .prepare = panel_simple_prepare,
494         .enable = panel_simple_enable,
495         .get_modes = panel_simple_get_modes,
496         .get_timings = panel_simple_get_timings,
497 };
498
499 static struct panel_desc panel_dpi;
500
501 static int panel_dpi_probe(struct device *dev,
502                            struct panel_simple *panel)
503 {
504         struct display_timing *timing;
505         const struct device_node *np;
506         struct panel_desc *desc;
507         unsigned int bus_flags;
508         struct videomode vm;
509         int ret;
510
511         np = dev->of_node;
512         desc = devm_kzalloc(dev, sizeof(*desc), GFP_KERNEL);
513         if (!desc)
514                 return -ENOMEM;
515
516         timing = devm_kzalloc(dev, sizeof(*timing), GFP_KERNEL);
517         if (!timing)
518                 return -ENOMEM;
519
520         ret = of_get_display_timing(np, "panel-timing", timing);
521         if (ret < 0) {
522                 dev_err(dev, "%pOF: no panel-timing node found for \"panel-dpi\" binding\n",
523                         np);
524                 return ret;
525         }
526
527         desc->timings = timing;
528         desc->num_timings = 1;
529
530         of_property_read_u32(np, "width-mm", &desc->size.width);
531         of_property_read_u32(np, "height-mm", &desc->size.height);
532
533         /* Extract bus_flags from display_timing */
534         bus_flags = 0;
535         vm.flags = timing->flags;
536         drm_bus_flags_from_videomode(&vm, &bus_flags);
537         desc->bus_flags = bus_flags;
538
539         /* We do not know the connector for the DT node, so guess it */
540         desc->connector_type = DRM_MODE_CONNECTOR_DPI;
541
542         panel->desc = desc;
543
544         return 0;
545 }
546
547 #define PANEL_SIMPLE_BOUNDS_CHECK(to_check, bounds, field) \
548         (to_check->field.typ >= bounds->field.min && \
549          to_check->field.typ <= bounds->field.max)
550 static void panel_simple_parse_panel_timing_node(struct device *dev,
551                                                  struct panel_simple *panel,
552                                                  const struct display_timing *ot)
553 {
554         const struct panel_desc *desc = panel->desc;
555         struct videomode vm;
556         unsigned int i;
557
558         if (WARN_ON(desc->num_modes)) {
559                 dev_err(dev, "Reject override mode: panel has a fixed mode\n");
560                 return;
561         }
562         if (WARN_ON(!desc->num_timings)) {
563                 dev_err(dev, "Reject override mode: no timings specified\n");
564                 return;
565         }
566
567         for (i = 0; i < panel->desc->num_timings; i++) {
568                 const struct display_timing *dt = &panel->desc->timings[i];
569
570                 if (!PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hactive) ||
571                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hfront_porch) ||
572                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hback_porch) ||
573                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, hsync_len) ||
574                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vactive) ||
575                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vfront_porch) ||
576                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vback_porch) ||
577                     !PANEL_SIMPLE_BOUNDS_CHECK(ot, dt, vsync_len))
578                         continue;
579
580                 if (ot->flags != dt->flags)
581                         continue;
582
583                 videomode_from_timing(ot, &vm);
584                 drm_display_mode_from_videomode(&vm, &panel->override_mode);
585                 panel->override_mode.type |= DRM_MODE_TYPE_DRIVER |
586                                              DRM_MODE_TYPE_PREFERRED;
587                 break;
588         }
589
590         if (WARN_ON(!panel->override_mode.type))
591                 dev_err(dev, "Reject override mode: No display_timing found\n");
592 }
593
594 static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
595 {
596         struct panel_simple *panel;
597         struct display_timing dt;
598         struct device_node *ddc;
599         int connector_type;
600         u32 bus_flags;
601         int err;
602
603         panel = devm_kzalloc(dev, sizeof(*panel), GFP_KERNEL);
604         if (!panel)
605                 return -ENOMEM;
606
607         panel->enabled = false;
608         panel->prepared_time = 0;
609         panel->desc = desc;
610
611         panel->no_hpd = of_property_read_bool(dev->of_node, "no-hpd");
612         if (!panel->no_hpd) {
613                 err = panel_simple_get_hpd_gpio(dev, panel, true);
614                 if (err)
615                         return err;
616         }
617
618         panel->supply = devm_regulator_get(dev, "power");
619         if (IS_ERR(panel->supply))
620                 return PTR_ERR(panel->supply);
621
622         panel->enable_gpio = devm_gpiod_get_optional(dev, "enable",
623                                                      GPIOD_OUT_LOW);
624         if (IS_ERR(panel->enable_gpio)) {
625                 err = PTR_ERR(panel->enable_gpio);
626                 if (err != -EPROBE_DEFER)
627                         dev_err(dev, "failed to request GPIO: %d\n", err);
628                 return err;
629         }
630
631         err = of_drm_get_panel_orientation(dev->of_node, &panel->orientation);
632         if (err) {
633                 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err);
634                 return err;
635         }
636
637         ddc = of_parse_phandle(dev->of_node, "ddc-i2c-bus", 0);
638         if (ddc) {
639                 panel->ddc = of_find_i2c_adapter_by_node(ddc);
640                 of_node_put(ddc);
641
642                 if (!panel->ddc)
643                         return -EPROBE_DEFER;
644         }
645
646         if (desc == &panel_dpi) {
647                 /* Handle the generic panel-dpi binding */
648                 err = panel_dpi_probe(dev, panel);
649                 if (err)
650                         goto free_ddc;
651         } else {
652                 if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
653                         panel_simple_parse_panel_timing_node(dev, panel, &dt);
654         }
655
656         connector_type = desc->connector_type;
657         /* Catch common mistakes for panels. */
658         switch (connector_type) {
659         case 0:
660                 dev_warn(dev, "Specify missing connector_type\n");
661                 connector_type = DRM_MODE_CONNECTOR_DPI;
662                 break;
663         case DRM_MODE_CONNECTOR_LVDS:
664                 WARN_ON(desc->bus_flags &
665                         ~(DRM_BUS_FLAG_DE_LOW |
666                           DRM_BUS_FLAG_DE_HIGH |
667                           DRM_BUS_FLAG_DATA_MSB_TO_LSB |
668                           DRM_BUS_FLAG_DATA_LSB_TO_MSB));
669                 WARN_ON(desc->bus_format != MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
670                         desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_SPWG &&
671                         desc->bus_format != MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA);
672                 WARN_ON(desc->bus_format == MEDIA_BUS_FMT_RGB666_1X7X3_SPWG &&
673                         desc->bpc != 6);
674                 WARN_ON((desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_SPWG ||
675                          desc->bus_format == MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA) &&
676                         desc->bpc != 8);
677                 break;
678         case DRM_MODE_CONNECTOR_eDP:
679                 if (desc->bus_format == 0)
680                         dev_warn(dev, "Specify missing bus_format\n");
681                 if (desc->bpc != 6 && desc->bpc != 8)
682                         dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc);
683                 break;
684         case DRM_MODE_CONNECTOR_DSI:
685                 if (desc->bpc != 6 && desc->bpc != 8)
686                         dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc);
687                 break;
688         case DRM_MODE_CONNECTOR_DPI:
689                 bus_flags = DRM_BUS_FLAG_DE_LOW |
690                             DRM_BUS_FLAG_DE_HIGH |
691                             DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE |
692                             DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
693                             DRM_BUS_FLAG_DATA_MSB_TO_LSB |
694                             DRM_BUS_FLAG_DATA_LSB_TO_MSB |
695                             DRM_BUS_FLAG_SYNC_SAMPLE_POSEDGE |
696                             DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE;
697                 if (desc->bus_flags & ~bus_flags)
698                         dev_warn(dev, "Unexpected bus_flags(%d)\n", desc->bus_flags & ~bus_flags);
699                 if (!(desc->bus_flags & bus_flags))
700                         dev_warn(dev, "Specify missing bus_flags\n");
701                 if (desc->bus_format == 0)
702                         dev_warn(dev, "Specify missing bus_format\n");
703                 if (desc->bpc != 6 && desc->bpc != 8)
704                         dev_warn(dev, "Expected bpc in {6,8} but got: %u\n", desc->bpc);
705                 break;
706         default:
707                 dev_warn(dev, "Specify a valid connector_type: %d\n", desc->connector_type);
708                 connector_type = DRM_MODE_CONNECTOR_DPI;
709                 break;
710         }
711
712         drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type);
713
714         err = drm_panel_of_backlight(&panel->base);
715         if (err)
716                 goto free_ddc;
717
718         drm_panel_add(&panel->base);
719
720         dev_set_drvdata(dev, panel);
721
722         return 0;
723
724 free_ddc:
725         if (panel->ddc)
726                 put_device(&panel->ddc->dev);
727
728         return err;
729 }
730
731 static int panel_simple_remove(struct device *dev)
732 {
733         struct panel_simple *panel = dev_get_drvdata(dev);
734
735         drm_panel_remove(&panel->base);
736         drm_panel_disable(&panel->base);
737         drm_panel_unprepare(&panel->base);
738
739         if (panel->ddc)
740                 put_device(&panel->ddc->dev);
741
742         return 0;
743 }
744
745 static void panel_simple_shutdown(struct device *dev)
746 {
747         struct panel_simple *panel = dev_get_drvdata(dev);
748
749         drm_panel_disable(&panel->base);
750         drm_panel_unprepare(&panel->base);
751 }
752
753 static const struct drm_display_mode ampire_am_1280800n3tzqw_t00h_mode = {
754         .clock = 71100,
755         .hdisplay = 1280,
756         .hsync_start = 1280 + 40,
757         .hsync_end = 1280 + 40 + 80,
758         .htotal = 1280 + 40 + 80 + 40,
759         .vdisplay = 800,
760         .vsync_start = 800 + 3,
761         .vsync_end = 800 + 3 + 10,
762         .vtotal = 800 + 3 + 10 + 10,
763         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
764 };
765
766 static const struct panel_desc ampire_am_1280800n3tzqw_t00h = {
767         .modes = &ampire_am_1280800n3tzqw_t00h_mode,
768         .num_modes = 1,
769         .bpc = 6,
770         .size = {
771                 .width = 217,
772                 .height = 136,
773         },
774         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
775         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
776         .connector_type = DRM_MODE_CONNECTOR_LVDS,
777 };
778
779 static const struct drm_display_mode ampire_am_480272h3tmqw_t01h_mode = {
780         .clock = 9000,
781         .hdisplay = 480,
782         .hsync_start = 480 + 2,
783         .hsync_end = 480 + 2 + 41,
784         .htotal = 480 + 2 + 41 + 2,
785         .vdisplay = 272,
786         .vsync_start = 272 + 2,
787         .vsync_end = 272 + 2 + 10,
788         .vtotal = 272 + 2 + 10 + 2,
789         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
790 };
791
792 static const struct panel_desc ampire_am_480272h3tmqw_t01h = {
793         .modes = &ampire_am_480272h3tmqw_t01h_mode,
794         .num_modes = 1,
795         .bpc = 8,
796         .size = {
797                 .width = 105,
798                 .height = 67,
799         },
800         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
801 };
802
803 static const struct drm_display_mode ampire_am800480r3tmqwa1h_mode = {
804         .clock = 33333,
805         .hdisplay = 800,
806         .hsync_start = 800 + 0,
807         .hsync_end = 800 + 0 + 255,
808         .htotal = 800 + 0 + 255 + 0,
809         .vdisplay = 480,
810         .vsync_start = 480 + 2,
811         .vsync_end = 480 + 2 + 45,
812         .vtotal = 480 + 2 + 45 + 0,
813         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
814 };
815
816 static const struct panel_desc ampire_am800480r3tmqwa1h = {
817         .modes = &ampire_am800480r3tmqwa1h_mode,
818         .num_modes = 1,
819         .bpc = 6,
820         .size = {
821                 .width = 152,
822                 .height = 91,
823         },
824         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
825 };
826
827 static const struct display_timing santek_st0700i5y_rbslw_f_timing = {
828         .pixelclock = { 26400000, 33300000, 46800000 },
829         .hactive = { 800, 800, 800 },
830         .hfront_porch = { 16, 210, 354 },
831         .hback_porch = { 45, 36, 6 },
832         .hsync_len = { 1, 10, 40 },
833         .vactive = { 480, 480, 480 },
834         .vfront_porch = { 7, 22, 147 },
835         .vback_porch = { 22, 13, 3 },
836         .vsync_len = { 1, 10, 20 },
837         .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
838                 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE
839 };
840
841 static const struct panel_desc armadeus_st0700_adapt = {
842         .timings = &santek_st0700i5y_rbslw_f_timing,
843         .num_timings = 1,
844         .bpc = 6,
845         .size = {
846                 .width = 154,
847                 .height = 86,
848         },
849         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
850         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
851 };
852
853 static const struct drm_display_mode auo_b101aw03_mode = {
854         .clock = 51450,
855         .hdisplay = 1024,
856         .hsync_start = 1024 + 156,
857         .hsync_end = 1024 + 156 + 8,
858         .htotal = 1024 + 156 + 8 + 156,
859         .vdisplay = 600,
860         .vsync_start = 600 + 16,
861         .vsync_end = 600 + 16 + 6,
862         .vtotal = 600 + 16 + 6 + 16,
863 };
864
865 static const struct panel_desc auo_b101aw03 = {
866         .modes = &auo_b101aw03_mode,
867         .num_modes = 1,
868         .bpc = 6,
869         .size = {
870                 .width = 223,
871                 .height = 125,
872         },
873         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
874         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
875         .connector_type = DRM_MODE_CONNECTOR_LVDS,
876 };
877
878 static const struct display_timing auo_b101ean01_timing = {
879         .pixelclock = { 65300000, 72500000, 75000000 },
880         .hactive = { 1280, 1280, 1280 },
881         .hfront_porch = { 18, 119, 119 },
882         .hback_porch = { 21, 21, 21 },
883         .hsync_len = { 32, 32, 32 },
884         .vactive = { 800, 800, 800 },
885         .vfront_porch = { 4, 4, 4 },
886         .vback_porch = { 8, 8, 8 },
887         .vsync_len = { 18, 20, 20 },
888 };
889
890 static const struct panel_desc auo_b101ean01 = {
891         .timings = &auo_b101ean01_timing,
892         .num_timings = 1,
893         .bpc = 6,
894         .size = {
895                 .width = 217,
896                 .height = 136,
897         },
898 };
899
900 static const struct drm_display_mode auo_b101xtn01_mode = {
901         .clock = 72000,
902         .hdisplay = 1366,
903         .hsync_start = 1366 + 20,
904         .hsync_end = 1366 + 20 + 70,
905         .htotal = 1366 + 20 + 70,
906         .vdisplay = 768,
907         .vsync_start = 768 + 14,
908         .vsync_end = 768 + 14 + 42,
909         .vtotal = 768 + 14 + 42,
910         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
911 };
912
913 static const struct panel_desc auo_b101xtn01 = {
914         .modes = &auo_b101xtn01_mode,
915         .num_modes = 1,
916         .bpc = 6,
917         .size = {
918                 .width = 223,
919                 .height = 125,
920         },
921 };
922
923 static const struct drm_display_mode auo_b116xak01_mode = {
924         .clock = 69300,
925         .hdisplay = 1366,
926         .hsync_start = 1366 + 48,
927         .hsync_end = 1366 + 48 + 32,
928         .htotal = 1366 + 48 + 32 + 10,
929         .vdisplay = 768,
930         .vsync_start = 768 + 4,
931         .vsync_end = 768 + 4 + 6,
932         .vtotal = 768 + 4 + 6 + 15,
933         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
934 };
935
936 static const struct panel_desc auo_b116xak01 = {
937         .modes = &auo_b116xak01_mode,
938         .num_modes = 1,
939         .bpc = 6,
940         .size = {
941                 .width = 256,
942                 .height = 144,
943         },
944         .delay = {
945                 .hpd_absent_delay = 200,
946         },
947         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
948         .connector_type = DRM_MODE_CONNECTOR_eDP,
949 };
950
951 static const struct drm_display_mode auo_b116xw03_mode = {
952         .clock = 70589,
953         .hdisplay = 1366,
954         .hsync_start = 1366 + 40,
955         .hsync_end = 1366 + 40 + 40,
956         .htotal = 1366 + 40 + 40 + 32,
957         .vdisplay = 768,
958         .vsync_start = 768 + 10,
959         .vsync_end = 768 + 10 + 12,
960         .vtotal = 768 + 10 + 12 + 6,
961         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
962 };
963
964 static const struct panel_desc auo_b116xw03 = {
965         .modes = &auo_b116xw03_mode,
966         .num_modes = 1,
967         .bpc = 6,
968         .size = {
969                 .width = 256,
970                 .height = 144,
971         },
972         .delay = {
973                 .enable = 400,
974         },
975         .bus_flags = DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
976         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
977         .connector_type = DRM_MODE_CONNECTOR_eDP,
978 };
979
980 static const struct drm_display_mode auo_b133xtn01_mode = {
981         .clock = 69500,
982         .hdisplay = 1366,
983         .hsync_start = 1366 + 48,
984         .hsync_end = 1366 + 48 + 32,
985         .htotal = 1366 + 48 + 32 + 20,
986         .vdisplay = 768,
987         .vsync_start = 768 + 3,
988         .vsync_end = 768 + 3 + 6,
989         .vtotal = 768 + 3 + 6 + 13,
990 };
991
992 static const struct panel_desc auo_b133xtn01 = {
993         .modes = &auo_b133xtn01_mode,
994         .num_modes = 1,
995         .bpc = 6,
996         .size = {
997                 .width = 293,
998                 .height = 165,
999         },
1000 };
1001
1002 static const struct drm_display_mode auo_b133htn01_mode = {
1003         .clock = 150660,
1004         .hdisplay = 1920,
1005         .hsync_start = 1920 + 172,
1006         .hsync_end = 1920 + 172 + 80,
1007         .htotal = 1920 + 172 + 80 + 60,
1008         .vdisplay = 1080,
1009         .vsync_start = 1080 + 25,
1010         .vsync_end = 1080 + 25 + 10,
1011         .vtotal = 1080 + 25 + 10 + 10,
1012 };
1013
1014 static const struct panel_desc auo_b133htn01 = {
1015         .modes = &auo_b133htn01_mode,
1016         .num_modes = 1,
1017         .bpc = 6,
1018         .size = {
1019                 .width = 293,
1020                 .height = 165,
1021         },
1022         .delay = {
1023                 .prepare = 105,
1024                 .enable = 20,
1025                 .unprepare = 50,
1026         },
1027 };
1028
1029 static const struct display_timing auo_g070vvn01_timings = {
1030         .pixelclock = { 33300000, 34209000, 45000000 },
1031         .hactive = { 800, 800, 800 },
1032         .hfront_porch = { 20, 40, 200 },
1033         .hback_porch = { 87, 40, 1 },
1034         .hsync_len = { 1, 48, 87 },
1035         .vactive = { 480, 480, 480 },
1036         .vfront_porch = { 5, 13, 200 },
1037         .vback_porch = { 31, 31, 29 },
1038         .vsync_len = { 1, 1, 3 },
1039 };
1040
1041 static const struct panel_desc auo_g070vvn01 = {
1042         .timings = &auo_g070vvn01_timings,
1043         .num_timings = 1,
1044         .bpc = 8,
1045         .size = {
1046                 .width = 152,
1047                 .height = 91,
1048         },
1049         .delay = {
1050                 .prepare = 200,
1051                 .enable = 50,
1052                 .disable = 50,
1053                 .unprepare = 1000,
1054         },
1055 };
1056
1057 static const struct drm_display_mode auo_g101evn010_mode = {
1058         .clock = 68930,
1059         .hdisplay = 1280,
1060         .hsync_start = 1280 + 82,
1061         .hsync_end = 1280 + 82 + 2,
1062         .htotal = 1280 + 82 + 2 + 84,
1063         .vdisplay = 800,
1064         .vsync_start = 800 + 8,
1065         .vsync_end = 800 + 8 + 2,
1066         .vtotal = 800 + 8 + 2 + 6,
1067 };
1068
1069 static const struct panel_desc auo_g101evn010 = {
1070         .modes = &auo_g101evn010_mode,
1071         .num_modes = 1,
1072         .bpc = 6,
1073         .size = {
1074                 .width = 216,
1075                 .height = 135,
1076         },
1077         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1078         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1079 };
1080
1081 static const struct drm_display_mode auo_g104sn02_mode = {
1082         .clock = 40000,
1083         .hdisplay = 800,
1084         .hsync_start = 800 + 40,
1085         .hsync_end = 800 + 40 + 216,
1086         .htotal = 800 + 40 + 216 + 128,
1087         .vdisplay = 600,
1088         .vsync_start = 600 + 10,
1089         .vsync_end = 600 + 10 + 35,
1090         .vtotal = 600 + 10 + 35 + 2,
1091 };
1092
1093 static const struct panel_desc auo_g104sn02 = {
1094         .modes = &auo_g104sn02_mode,
1095         .num_modes = 1,
1096         .bpc = 8,
1097         .size = {
1098                 .width = 211,
1099                 .height = 158,
1100         },
1101 };
1102
1103 static const struct drm_display_mode auo_g121ean01_mode = {
1104         .clock = 66700,
1105         .hdisplay = 1280,
1106         .hsync_start = 1280 + 58,
1107         .hsync_end = 1280 + 58 + 8,
1108         .htotal = 1280 + 58 + 8 + 70,
1109         .vdisplay = 800,
1110         .vsync_start = 800 + 6,
1111         .vsync_end = 800 + 6 + 4,
1112         .vtotal = 800 + 6 + 4 + 10,
1113 };
1114
1115 static const struct panel_desc auo_g121ean01 = {
1116         .modes = &auo_g121ean01_mode,
1117         .num_modes = 1,
1118         .bpc = 8,
1119         .size = {
1120                 .width = 261,
1121                 .height = 163,
1122         },
1123         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1124         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1125 };
1126
1127 static const struct display_timing auo_g133han01_timings = {
1128         .pixelclock = { 134000000, 141200000, 149000000 },
1129         .hactive = { 1920, 1920, 1920 },
1130         .hfront_porch = { 39, 58, 77 },
1131         .hback_porch = { 59, 88, 117 },
1132         .hsync_len = { 28, 42, 56 },
1133         .vactive = { 1080, 1080, 1080 },
1134         .vfront_porch = { 3, 8, 11 },
1135         .vback_porch = { 5, 14, 19 },
1136         .vsync_len = { 4, 14, 19 },
1137 };
1138
1139 static const struct panel_desc auo_g133han01 = {
1140         .timings = &auo_g133han01_timings,
1141         .num_timings = 1,
1142         .bpc = 8,
1143         .size = {
1144                 .width = 293,
1145                 .height = 165,
1146         },
1147         .delay = {
1148                 .prepare = 200,
1149                 .enable = 50,
1150                 .disable = 50,
1151                 .unprepare = 1000,
1152         },
1153         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
1154         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1155 };
1156
1157 static const struct drm_display_mode auo_g156xtn01_mode = {
1158         .clock = 76000,
1159         .hdisplay = 1366,
1160         .hsync_start = 1366 + 33,
1161         .hsync_end = 1366 + 33 + 67,
1162         .htotal = 1560,
1163         .vdisplay = 768,
1164         .vsync_start = 768 + 4,
1165         .vsync_end = 768 + 4 + 4,
1166         .vtotal = 806,
1167 };
1168
1169 static const struct panel_desc auo_g156xtn01 = {
1170         .modes = &auo_g156xtn01_mode,
1171         .num_modes = 1,
1172         .bpc = 8,
1173         .size = {
1174                 .width = 344,
1175                 .height = 194,
1176         },
1177         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1178         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1179 };
1180
1181 static const struct display_timing auo_g185han01_timings = {
1182         .pixelclock = { 120000000, 144000000, 175000000 },
1183         .hactive = { 1920, 1920, 1920 },
1184         .hfront_porch = { 36, 120, 148 },
1185         .hback_porch = { 24, 88, 108 },
1186         .hsync_len = { 20, 48, 64 },
1187         .vactive = { 1080, 1080, 1080 },
1188         .vfront_porch = { 6, 10, 40 },
1189         .vback_porch = { 2, 5, 20 },
1190         .vsync_len = { 2, 5, 20 },
1191 };
1192
1193 static const struct panel_desc auo_g185han01 = {
1194         .timings = &auo_g185han01_timings,
1195         .num_timings = 1,
1196         .bpc = 8,
1197         .size = {
1198                 .width = 409,
1199                 .height = 230,
1200         },
1201         .delay = {
1202                 .prepare = 50,
1203                 .enable = 200,
1204                 .disable = 110,
1205                 .unprepare = 1000,
1206         },
1207         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1208         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1209 };
1210
1211 static const struct display_timing auo_g190ean01_timings = {
1212         .pixelclock = { 90000000, 108000000, 135000000 },
1213         .hactive = { 1280, 1280, 1280 },
1214         .hfront_porch = { 126, 184, 1266 },
1215         .hback_porch = { 84, 122, 844 },
1216         .hsync_len = { 70, 102, 704 },
1217         .vactive = { 1024, 1024, 1024 },
1218         .vfront_porch = { 4, 26, 76 },
1219         .vback_porch = { 2, 8, 25 },
1220         .vsync_len = { 2, 8, 25 },
1221 };
1222
1223 static const struct panel_desc auo_g190ean01 = {
1224         .timings = &auo_g190ean01_timings,
1225         .num_timings = 1,
1226         .bpc = 8,
1227         .size = {
1228                 .width = 376,
1229                 .height = 301,
1230         },
1231         .delay = {
1232                 .prepare = 50,
1233                 .enable = 200,
1234                 .disable = 110,
1235                 .unprepare = 1000,
1236         },
1237         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1238         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1239 };
1240
1241 static const struct display_timing auo_p320hvn03_timings = {
1242         .pixelclock = { 106000000, 148500000, 164000000 },
1243         .hactive = { 1920, 1920, 1920 },
1244         .hfront_porch = { 25, 50, 130 },
1245         .hback_porch = { 25, 50, 130 },
1246         .hsync_len = { 20, 40, 105 },
1247         .vactive = { 1080, 1080, 1080 },
1248         .vfront_porch = { 8, 17, 150 },
1249         .vback_porch = { 8, 17, 150 },
1250         .vsync_len = { 4, 11, 100 },
1251 };
1252
1253 static const struct panel_desc auo_p320hvn03 = {
1254         .timings = &auo_p320hvn03_timings,
1255         .num_timings = 1,
1256         .bpc = 8,
1257         .size = {
1258                 .width = 698,
1259                 .height = 393,
1260         },
1261         .delay = {
1262                 .prepare = 1,
1263                 .enable = 450,
1264                 .unprepare = 500,
1265         },
1266         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1267         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1268 };
1269
1270 static const struct drm_display_mode auo_t215hvn01_mode = {
1271         .clock = 148800,
1272         .hdisplay = 1920,
1273         .hsync_start = 1920 + 88,
1274         .hsync_end = 1920 + 88 + 44,
1275         .htotal = 1920 + 88 + 44 + 148,
1276         .vdisplay = 1080,
1277         .vsync_start = 1080 + 4,
1278         .vsync_end = 1080 + 4 + 5,
1279         .vtotal = 1080 + 4 + 5 + 36,
1280 };
1281
1282 static const struct panel_desc auo_t215hvn01 = {
1283         .modes = &auo_t215hvn01_mode,
1284         .num_modes = 1,
1285         .bpc = 8,
1286         .size = {
1287                 .width = 430,
1288                 .height = 270,
1289         },
1290         .delay = {
1291                 .disable = 5,
1292                 .unprepare = 1000,
1293         }
1294 };
1295
1296 static const struct drm_display_mode avic_tm070ddh03_mode = {
1297         .clock = 51200,
1298         .hdisplay = 1024,
1299         .hsync_start = 1024 + 160,
1300         .hsync_end = 1024 + 160 + 4,
1301         .htotal = 1024 + 160 + 4 + 156,
1302         .vdisplay = 600,
1303         .vsync_start = 600 + 17,
1304         .vsync_end = 600 + 17 + 1,
1305         .vtotal = 600 + 17 + 1 + 17,
1306 };
1307
1308 static const struct panel_desc avic_tm070ddh03 = {
1309         .modes = &avic_tm070ddh03_mode,
1310         .num_modes = 1,
1311         .bpc = 8,
1312         .size = {
1313                 .width = 154,
1314                 .height = 90,
1315         },
1316         .delay = {
1317                 .prepare = 20,
1318                 .enable = 200,
1319                 .disable = 200,
1320         },
1321 };
1322
1323 static const struct drm_display_mode bananapi_s070wv20_ct16_mode = {
1324         .clock = 30000,
1325         .hdisplay = 800,
1326         .hsync_start = 800 + 40,
1327         .hsync_end = 800 + 40 + 48,
1328         .htotal = 800 + 40 + 48 + 40,
1329         .vdisplay = 480,
1330         .vsync_start = 480 + 13,
1331         .vsync_end = 480 + 13 + 3,
1332         .vtotal = 480 + 13 + 3 + 29,
1333 };
1334
1335 static const struct panel_desc bananapi_s070wv20_ct16 = {
1336         .modes = &bananapi_s070wv20_ct16_mode,
1337         .num_modes = 1,
1338         .bpc = 6,
1339         .size = {
1340                 .width = 154,
1341                 .height = 86,
1342         },
1343 };
1344
1345 static const struct drm_display_mode boe_hv070wsa_mode = {
1346         .clock = 42105,
1347         .hdisplay = 1024,
1348         .hsync_start = 1024 + 30,
1349         .hsync_end = 1024 + 30 + 30,
1350         .htotal = 1024 + 30 + 30 + 30,
1351         .vdisplay = 600,
1352         .vsync_start = 600 + 10,
1353         .vsync_end = 600 + 10 + 10,
1354         .vtotal = 600 + 10 + 10 + 10,
1355 };
1356
1357 static const struct panel_desc boe_hv070wsa = {
1358         .modes = &boe_hv070wsa_mode,
1359         .num_modes = 1,
1360         .bpc = 8,
1361         .size = {
1362                 .width = 154,
1363                 .height = 90,
1364         },
1365         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1366         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1367         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1368 };
1369
1370 static const struct drm_display_mode boe_nv101wxmn51_modes[] = {
1371         {
1372                 .clock = 71900,
1373                 .hdisplay = 1280,
1374                 .hsync_start = 1280 + 48,
1375                 .hsync_end = 1280 + 48 + 32,
1376                 .htotal = 1280 + 48 + 32 + 80,
1377                 .vdisplay = 800,
1378                 .vsync_start = 800 + 3,
1379                 .vsync_end = 800 + 3 + 5,
1380                 .vtotal = 800 + 3 + 5 + 24,
1381         },
1382         {
1383                 .clock = 57500,
1384                 .hdisplay = 1280,
1385                 .hsync_start = 1280 + 48,
1386                 .hsync_end = 1280 + 48 + 32,
1387                 .htotal = 1280 + 48 + 32 + 80,
1388                 .vdisplay = 800,
1389                 .vsync_start = 800 + 3,
1390                 .vsync_end = 800 + 3 + 5,
1391                 .vtotal = 800 + 3 + 5 + 24,
1392         },
1393 };
1394
1395 static const struct panel_desc boe_nv101wxmn51 = {
1396         .modes = boe_nv101wxmn51_modes,
1397         .num_modes = ARRAY_SIZE(boe_nv101wxmn51_modes),
1398         .bpc = 8,
1399         .size = {
1400                 .width = 217,
1401                 .height = 136,
1402         },
1403         .delay = {
1404                 .prepare = 210,
1405                 .enable = 50,
1406                 .unprepare = 160,
1407         },
1408 };
1409
1410 static const struct drm_display_mode boe_nv110wtm_n61_modes[] = {
1411         {
1412                 .clock = 207800,
1413                 .hdisplay = 2160,
1414                 .hsync_start = 2160 + 48,
1415                 .hsync_end = 2160 + 48 + 32,
1416                 .htotal = 2160 + 48 + 32 + 100,
1417                 .vdisplay = 1440,
1418                 .vsync_start = 1440 + 3,
1419                 .vsync_end = 1440 + 3 + 6,
1420                 .vtotal = 1440 + 3 + 6 + 31,
1421                 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
1422         },
1423         {
1424                 .clock = 138500,
1425                 .hdisplay = 2160,
1426                 .hsync_start = 2160 + 48,
1427                 .hsync_end = 2160 + 48 + 32,
1428                 .htotal = 2160 + 48 + 32 + 100,
1429                 .vdisplay = 1440,
1430                 .vsync_start = 1440 + 3,
1431                 .vsync_end = 1440 + 3 + 6,
1432                 .vtotal = 1440 + 3 + 6 + 31,
1433                 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
1434         },
1435 };
1436
1437 static const struct panel_desc boe_nv110wtm_n61 = {
1438         .modes = boe_nv110wtm_n61_modes,
1439         .num_modes = ARRAY_SIZE(boe_nv110wtm_n61_modes),
1440         .bpc = 8,
1441         .size = {
1442                 .width = 233,
1443                 .height = 155,
1444         },
1445         .delay = {
1446                 .hpd_absent_delay = 200,
1447                 .prepare_to_enable = 80,
1448                 .unprepare = 500,
1449         },
1450         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1451         .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
1452         .connector_type = DRM_MODE_CONNECTOR_eDP,
1453 };
1454
1455 /* Also used for boe_nv133fhm_n62 */
1456 static const struct drm_display_mode boe_nv133fhm_n61_modes = {
1457         .clock = 147840,
1458         .hdisplay = 1920,
1459         .hsync_start = 1920 + 48,
1460         .hsync_end = 1920 + 48 + 32,
1461         .htotal = 1920 + 48 + 32 + 200,
1462         .vdisplay = 1080,
1463         .vsync_start = 1080 + 3,
1464         .vsync_end = 1080 + 3 + 6,
1465         .vtotal = 1080 + 3 + 6 + 31,
1466         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
1467 };
1468
1469 /* Also used for boe_nv133fhm_n62 */
1470 static const struct panel_desc boe_nv133fhm_n61 = {
1471         .modes = &boe_nv133fhm_n61_modes,
1472         .num_modes = 1,
1473         .bpc = 6,
1474         .size = {
1475                 .width = 294,
1476                 .height = 165,
1477         },
1478         .delay = {
1479                 /*
1480                  * When power is first given to the panel there's a short
1481                  * spike on the HPD line.  It was explained that this spike
1482                  * was until the TCON data download was complete.  On
1483                  * one system this was measured at 8 ms.  We'll put 15 ms
1484                  * in the prepare delay just to be safe and take it away
1485                  * from the hpd_absent_delay (which would otherwise be 200 ms)
1486                  * to handle this.  That means:
1487                  * - If HPD isn't hooked up you still have 200 ms delay.
1488                  * - If HPD is hooked up we won't try to look at it for the
1489                  *   first 15 ms.
1490                  */
1491                 .prepare = 15,
1492                 .hpd_absent_delay = 185,
1493
1494                 .unprepare = 500,
1495         },
1496         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1497         .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
1498         .connector_type = DRM_MODE_CONNECTOR_eDP,
1499 };
1500
1501 static const struct drm_display_mode boe_nv140fhmn49_modes[] = {
1502         {
1503                 .clock = 148500,
1504                 .hdisplay = 1920,
1505                 .hsync_start = 1920 + 48,
1506                 .hsync_end = 1920 + 48 + 32,
1507                 .htotal = 2200,
1508                 .vdisplay = 1080,
1509                 .vsync_start = 1080 + 3,
1510                 .vsync_end = 1080 + 3 + 5,
1511                 .vtotal = 1125,
1512         },
1513 };
1514
1515 static const struct panel_desc boe_nv140fhmn49 = {
1516         .modes = boe_nv140fhmn49_modes,
1517         .num_modes = ARRAY_SIZE(boe_nv140fhmn49_modes),
1518         .bpc = 6,
1519         .size = {
1520                 .width = 309,
1521                 .height = 174,
1522         },
1523         .delay = {
1524                 .prepare = 210,
1525                 .enable = 50,
1526                 .unprepare = 160,
1527         },
1528         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1529         .connector_type = DRM_MODE_CONNECTOR_eDP,
1530 };
1531
1532 static const struct drm_display_mode cdtech_s043wq26h_ct7_mode = {
1533         .clock = 9000,
1534         .hdisplay = 480,
1535         .hsync_start = 480 + 5,
1536         .hsync_end = 480 + 5 + 5,
1537         .htotal = 480 + 5 + 5 + 40,
1538         .vdisplay = 272,
1539         .vsync_start = 272 + 8,
1540         .vsync_end = 272 + 8 + 8,
1541         .vtotal = 272 + 8 + 8 + 8,
1542         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1543 };
1544
1545 static const struct panel_desc cdtech_s043wq26h_ct7 = {
1546         .modes = &cdtech_s043wq26h_ct7_mode,
1547         .num_modes = 1,
1548         .bpc = 8,
1549         .size = {
1550                 .width = 95,
1551                 .height = 54,
1552         },
1553         .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1554 };
1555
1556 /* S070PWS19HP-FC21 2017/04/22 */
1557 static const struct drm_display_mode cdtech_s070pws19hp_fc21_mode = {
1558         .clock = 51200,
1559         .hdisplay = 1024,
1560         .hsync_start = 1024 + 160,
1561         .hsync_end = 1024 + 160 + 20,
1562         .htotal = 1024 + 160 + 20 + 140,
1563         .vdisplay = 600,
1564         .vsync_start = 600 + 12,
1565         .vsync_end = 600 + 12 + 3,
1566         .vtotal = 600 + 12 + 3 + 20,
1567         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1568 };
1569
1570 static const struct panel_desc cdtech_s070pws19hp_fc21 = {
1571         .modes = &cdtech_s070pws19hp_fc21_mode,
1572         .num_modes = 1,
1573         .bpc = 6,
1574         .size = {
1575                 .width = 154,
1576                 .height = 86,
1577         },
1578         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1579         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
1580         .connector_type = DRM_MODE_CONNECTOR_DPI,
1581 };
1582
1583 /* S070SWV29HG-DC44 2017/09/21 */
1584 static const struct drm_display_mode cdtech_s070swv29hg_dc44_mode = {
1585         .clock = 33300,
1586         .hdisplay = 800,
1587         .hsync_start = 800 + 210,
1588         .hsync_end = 800 + 210 + 2,
1589         .htotal = 800 + 210 + 2 + 44,
1590         .vdisplay = 480,
1591         .vsync_start = 480 + 22,
1592         .vsync_end = 480 + 22 + 2,
1593         .vtotal = 480 + 22 + 2 + 21,
1594         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1595 };
1596
1597 static const struct panel_desc cdtech_s070swv29hg_dc44 = {
1598         .modes = &cdtech_s070swv29hg_dc44_mode,
1599         .num_modes = 1,
1600         .bpc = 6,
1601         .size = {
1602                 .width = 154,
1603                 .height = 86,
1604         },
1605         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1606         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
1607         .connector_type = DRM_MODE_CONNECTOR_DPI,
1608 };
1609
1610 static const struct drm_display_mode cdtech_s070wv95_ct16_mode = {
1611         .clock = 35000,
1612         .hdisplay = 800,
1613         .hsync_start = 800 + 40,
1614         .hsync_end = 800 + 40 + 40,
1615         .htotal = 800 + 40 + 40 + 48,
1616         .vdisplay = 480,
1617         .vsync_start = 480 + 29,
1618         .vsync_end = 480 + 29 + 13,
1619         .vtotal = 480 + 29 + 13 + 3,
1620         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1621 };
1622
1623 static const struct panel_desc cdtech_s070wv95_ct16 = {
1624         .modes = &cdtech_s070wv95_ct16_mode,
1625         .num_modes = 1,
1626         .bpc = 8,
1627         .size = {
1628                 .width = 154,
1629                 .height = 85,
1630         },
1631 };
1632
1633 static const struct display_timing chefree_ch101olhlwh_002_timing = {
1634         .pixelclock = { 68900000, 71100000, 73400000 },
1635         .hactive = { 1280, 1280, 1280 },
1636         .hfront_porch = { 65, 80, 95 },
1637         .hback_porch = { 64, 79, 94 },
1638         .hsync_len = { 1, 1, 1 },
1639         .vactive = { 800, 800, 800 },
1640         .vfront_porch = { 7, 11, 14 },
1641         .vback_porch = { 7, 11, 14 },
1642         .vsync_len = { 1, 1, 1 },
1643         .flags = DISPLAY_FLAGS_DE_HIGH,
1644 };
1645
1646 static const struct panel_desc chefree_ch101olhlwh_002 = {
1647         .timings = &chefree_ch101olhlwh_002_timing,
1648         .num_timings = 1,
1649         .bpc = 8,
1650         .size = {
1651                 .width = 217,
1652                 .height = 135,
1653         },
1654         .delay = {
1655                 .enable = 200,
1656                 .disable = 200,
1657         },
1658         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1659         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1660         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1661 };
1662
1663 static const struct drm_display_mode chunghwa_claa070wp03xg_mode = {
1664         .clock = 66770,
1665         .hdisplay = 800,
1666         .hsync_start = 800 + 49,
1667         .hsync_end = 800 + 49 + 33,
1668         .htotal = 800 + 49 + 33 + 17,
1669         .vdisplay = 1280,
1670         .vsync_start = 1280 + 1,
1671         .vsync_end = 1280 + 1 + 7,
1672         .vtotal = 1280 + 1 + 7 + 15,
1673         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1674 };
1675
1676 static const struct panel_desc chunghwa_claa070wp03xg = {
1677         .modes = &chunghwa_claa070wp03xg_mode,
1678         .num_modes = 1,
1679         .bpc = 6,
1680         .size = {
1681                 .width = 94,
1682                 .height = 150,
1683         },
1684         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1685         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1686         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1687 };
1688
1689 static const struct drm_display_mode chunghwa_claa101wa01a_mode = {
1690         .clock = 72070,
1691         .hdisplay = 1366,
1692         .hsync_start = 1366 + 58,
1693         .hsync_end = 1366 + 58 + 58,
1694         .htotal = 1366 + 58 + 58 + 58,
1695         .vdisplay = 768,
1696         .vsync_start = 768 + 4,
1697         .vsync_end = 768 + 4 + 4,
1698         .vtotal = 768 + 4 + 4 + 4,
1699 };
1700
1701 static const struct panel_desc chunghwa_claa101wa01a = {
1702         .modes = &chunghwa_claa101wa01a_mode,
1703         .num_modes = 1,
1704         .bpc = 6,
1705         .size = {
1706                 .width = 220,
1707                 .height = 120,
1708         },
1709         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1710         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1711         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1712 };
1713
1714 static const struct drm_display_mode chunghwa_claa101wb01_mode = {
1715         .clock = 69300,
1716         .hdisplay = 1366,
1717         .hsync_start = 1366 + 48,
1718         .hsync_end = 1366 + 48 + 32,
1719         .htotal = 1366 + 48 + 32 + 20,
1720         .vdisplay = 768,
1721         .vsync_start = 768 + 16,
1722         .vsync_end = 768 + 16 + 8,
1723         .vtotal = 768 + 16 + 8 + 16,
1724 };
1725
1726 static const struct panel_desc chunghwa_claa101wb01 = {
1727         .modes = &chunghwa_claa101wb01_mode,
1728         .num_modes = 1,
1729         .bpc = 6,
1730         .size = {
1731                 .width = 223,
1732                 .height = 125,
1733         },
1734         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1735         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
1736         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1737 };
1738
1739 static const struct drm_display_mode dataimage_scf0700c48ggu18_mode = {
1740         .clock = 33260,
1741         .hdisplay = 800,
1742         .hsync_start = 800 + 40,
1743         .hsync_end = 800 + 40 + 128,
1744         .htotal = 800 + 40 + 128 + 88,
1745         .vdisplay = 480,
1746         .vsync_start = 480 + 10,
1747         .vsync_end = 480 + 10 + 2,
1748         .vtotal = 480 + 10 + 2 + 33,
1749         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1750 };
1751
1752 static const struct panel_desc dataimage_scf0700c48ggu18 = {
1753         .modes = &dataimage_scf0700c48ggu18_mode,
1754         .num_modes = 1,
1755         .bpc = 8,
1756         .size = {
1757                 .width = 152,
1758                 .height = 91,
1759         },
1760         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1761         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1762 };
1763
1764 static const struct display_timing dlc_dlc0700yzg_1_timing = {
1765         .pixelclock = { 45000000, 51200000, 57000000 },
1766         .hactive = { 1024, 1024, 1024 },
1767         .hfront_porch = { 100, 106, 113 },
1768         .hback_porch = { 100, 106, 113 },
1769         .hsync_len = { 100, 108, 114 },
1770         .vactive = { 600, 600, 600 },
1771         .vfront_porch = { 8, 11, 15 },
1772         .vback_porch = { 8, 11, 15 },
1773         .vsync_len = { 9, 13, 15 },
1774         .flags = DISPLAY_FLAGS_DE_HIGH,
1775 };
1776
1777 static const struct panel_desc dlc_dlc0700yzg_1 = {
1778         .timings = &dlc_dlc0700yzg_1_timing,
1779         .num_timings = 1,
1780         .bpc = 6,
1781         .size = {
1782                 .width = 154,
1783                 .height = 86,
1784         },
1785         .delay = {
1786                 .prepare = 30,
1787                 .enable = 200,
1788                 .disable = 200,
1789         },
1790         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
1791         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1792 };
1793
1794 static const struct display_timing dlc_dlc1010gig_timing = {
1795         .pixelclock = { 68900000, 71100000, 73400000 },
1796         .hactive = { 1280, 1280, 1280 },
1797         .hfront_porch = { 43, 53, 63 },
1798         .hback_porch = { 43, 53, 63 },
1799         .hsync_len = { 44, 54, 64 },
1800         .vactive = { 800, 800, 800 },
1801         .vfront_porch = { 5, 8, 11 },
1802         .vback_porch = { 5, 8, 11 },
1803         .vsync_len = { 5, 7, 11 },
1804         .flags = DISPLAY_FLAGS_DE_HIGH,
1805 };
1806
1807 static const struct panel_desc dlc_dlc1010gig = {
1808         .timings = &dlc_dlc1010gig_timing,
1809         .num_timings = 1,
1810         .bpc = 8,
1811         .size = {
1812                 .width = 216,
1813                 .height = 135,
1814         },
1815         .delay = {
1816                 .prepare = 60,
1817                 .enable = 150,
1818                 .disable = 100,
1819                 .unprepare = 60,
1820         },
1821         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
1822         .connector_type = DRM_MODE_CONNECTOR_LVDS,
1823 };
1824
1825 static const struct drm_display_mode edt_et035012dm6_mode = {
1826         .clock = 6500,
1827         .hdisplay = 320,
1828         .hsync_start = 320 + 20,
1829         .hsync_end = 320 + 20 + 30,
1830         .htotal = 320 + 20 + 68,
1831         .vdisplay = 240,
1832         .vsync_start = 240 + 4,
1833         .vsync_end = 240 + 4 + 4,
1834         .vtotal = 240 + 4 + 4 + 14,
1835         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1836 };
1837
1838 static const struct panel_desc edt_et035012dm6 = {
1839         .modes = &edt_et035012dm6_mode,
1840         .num_modes = 1,
1841         .bpc = 8,
1842         .size = {
1843                 .width = 70,
1844                 .height = 52,
1845         },
1846         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1847         .bus_flags = DRM_BUS_FLAG_DE_LOW | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
1848 };
1849
1850 static const struct drm_display_mode edt_etm043080dh6gp_mode = {
1851         .clock = 10870,
1852         .hdisplay = 480,
1853         .hsync_start = 480 + 8,
1854         .hsync_end = 480 + 8 + 4,
1855         .htotal = 480 + 8 + 4 + 41,
1856
1857         /*
1858          * IWG22M: Y resolution changed for "dc_linuxfb" module crashing while
1859          * fb_align
1860          */
1861
1862         .vdisplay = 288,
1863         .vsync_start = 288 + 2,
1864         .vsync_end = 288 + 2 + 4,
1865         .vtotal = 288 + 2 + 4 + 10,
1866 };
1867
1868 static const struct panel_desc edt_etm043080dh6gp = {
1869         .modes = &edt_etm043080dh6gp_mode,
1870         .num_modes = 1,
1871         .bpc = 8,
1872         .size = {
1873                 .width = 100,
1874                 .height = 65,
1875         },
1876         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1877         .connector_type = DRM_MODE_CONNECTOR_DPI,
1878 };
1879
1880 static const struct drm_display_mode edt_etm0430g0dh6_mode = {
1881         .clock = 9000,
1882         .hdisplay = 480,
1883         .hsync_start = 480 + 2,
1884         .hsync_end = 480 + 2 + 41,
1885         .htotal = 480 + 2 + 41 + 2,
1886         .vdisplay = 272,
1887         .vsync_start = 272 + 2,
1888         .vsync_end = 272 + 2 + 10,
1889         .vtotal = 272 + 2 + 10 + 2,
1890         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1891 };
1892
1893 static const struct panel_desc edt_etm0430g0dh6 = {
1894         .modes = &edt_etm0430g0dh6_mode,
1895         .num_modes = 1,
1896         .bpc = 6,
1897         .size = {
1898                 .width = 95,
1899                 .height = 54,
1900         },
1901 };
1902
1903 static const struct drm_display_mode edt_et057090dhu_mode = {
1904         .clock = 25175,
1905         .hdisplay = 640,
1906         .hsync_start = 640 + 16,
1907         .hsync_end = 640 + 16 + 30,
1908         .htotal = 640 + 16 + 30 + 114,
1909         .vdisplay = 480,
1910         .vsync_start = 480 + 10,
1911         .vsync_end = 480 + 10 + 3,
1912         .vtotal = 480 + 10 + 3 + 32,
1913         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
1914 };
1915
1916 static const struct panel_desc edt_et057090dhu = {
1917         .modes = &edt_et057090dhu_mode,
1918         .num_modes = 1,
1919         .bpc = 6,
1920         .size = {
1921                 .width = 115,
1922                 .height = 86,
1923         },
1924         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1925         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1926         .connector_type = DRM_MODE_CONNECTOR_DPI,
1927 };
1928
1929 static const struct drm_display_mode edt_etm0700g0dh6_mode = {
1930         .clock = 33260,
1931         .hdisplay = 800,
1932         .hsync_start = 800 + 40,
1933         .hsync_end = 800 + 40 + 128,
1934         .htotal = 800 + 40 + 128 + 88,
1935         .vdisplay = 480,
1936         .vsync_start = 480 + 10,
1937         .vsync_end = 480 + 10 + 2,
1938         .vtotal = 480 + 10 + 2 + 33,
1939         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
1940 };
1941
1942 static const struct panel_desc edt_etm0700g0dh6 = {
1943         .modes = &edt_etm0700g0dh6_mode,
1944         .num_modes = 1,
1945         .bpc = 6,
1946         .size = {
1947                 .width = 152,
1948                 .height = 91,
1949         },
1950         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1951         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
1952         .connector_type = DRM_MODE_CONNECTOR_DPI,
1953 };
1954
1955 static const struct panel_desc edt_etm0700g0bdh6 = {
1956         .modes = &edt_etm0700g0dh6_mode,
1957         .num_modes = 1,
1958         .bpc = 6,
1959         .size = {
1960                 .width = 152,
1961                 .height = 91,
1962         },
1963         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
1964         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
1965 };
1966
1967 static const struct display_timing evervision_vgg804821_timing = {
1968         .pixelclock = { 27600000, 33300000, 50000000 },
1969         .hactive = { 800, 800, 800 },
1970         .hfront_porch = { 40, 66, 70 },
1971         .hback_porch = { 40, 67, 70 },
1972         .hsync_len = { 40, 67, 70 },
1973         .vactive = { 480, 480, 480 },
1974         .vfront_porch = { 6, 10, 10 },
1975         .vback_porch = { 7, 11, 11 },
1976         .vsync_len = { 7, 11, 11 },
1977         .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
1978                  DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
1979                  DISPLAY_FLAGS_SYNC_NEGEDGE,
1980 };
1981
1982 static const struct panel_desc evervision_vgg804821 = {
1983         .timings = &evervision_vgg804821_timing,
1984         .num_timings = 1,
1985         .bpc = 8,
1986         .size = {
1987                 .width = 108,
1988                 .height = 64,
1989         },
1990         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
1991         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
1992 };
1993
1994 static const struct drm_display_mode foxlink_fl500wvr00_a0t_mode = {
1995         .clock = 32260,
1996         .hdisplay = 800,
1997         .hsync_start = 800 + 168,
1998         .hsync_end = 800 + 168 + 64,
1999         .htotal = 800 + 168 + 64 + 88,
2000         .vdisplay = 480,
2001         .vsync_start = 480 + 37,
2002         .vsync_end = 480 + 37 + 2,
2003         .vtotal = 480 + 37 + 2 + 8,
2004 };
2005
2006 static const struct panel_desc foxlink_fl500wvr00_a0t = {
2007         .modes = &foxlink_fl500wvr00_a0t_mode,
2008         .num_modes = 1,
2009         .bpc = 8,
2010         .size = {
2011                 .width = 108,
2012                 .height = 65,
2013         },
2014         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2015 };
2016
2017 static const struct drm_display_mode frida_frd350h54004_modes[] = {
2018         { /* 60 Hz */
2019                 .clock = 6000,
2020                 .hdisplay = 320,
2021                 .hsync_start = 320 + 44,
2022                 .hsync_end = 320 + 44 + 16,
2023                 .htotal = 320 + 44 + 16 + 20,
2024                 .vdisplay = 240,
2025                 .vsync_start = 240 + 2,
2026                 .vsync_end = 240 + 2 + 6,
2027                 .vtotal = 240 + 2 + 6 + 2,
2028                 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2029         },
2030         { /* 50 Hz */
2031                 .clock = 5400,
2032                 .hdisplay = 320,
2033                 .hsync_start = 320 + 56,
2034                 .hsync_end = 320 + 56 + 16,
2035                 .htotal = 320 + 56 + 16 + 40,
2036                 .vdisplay = 240,
2037                 .vsync_start = 240 + 2,
2038                 .vsync_end = 240 + 2 + 6,
2039                 .vtotal = 240 + 2 + 6 + 2,
2040                 .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2041         },
2042 };
2043
2044 static const struct panel_desc frida_frd350h54004 = {
2045         .modes = frida_frd350h54004_modes,
2046         .num_modes = ARRAY_SIZE(frida_frd350h54004_modes),
2047         .bpc = 8,
2048         .size = {
2049                 .width = 77,
2050                 .height = 64,
2051         },
2052         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2053         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
2054         .connector_type = DRM_MODE_CONNECTOR_DPI,
2055 };
2056
2057 static const struct drm_display_mode friendlyarm_hd702e_mode = {
2058         .clock          = 67185,
2059         .hdisplay       = 800,
2060         .hsync_start    = 800 + 20,
2061         .hsync_end      = 800 + 20 + 24,
2062         .htotal         = 800 + 20 + 24 + 20,
2063         .vdisplay       = 1280,
2064         .vsync_start    = 1280 + 4,
2065         .vsync_end      = 1280 + 4 + 8,
2066         .vtotal         = 1280 + 4 + 8 + 4,
2067         .flags          = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2068 };
2069
2070 static const struct panel_desc friendlyarm_hd702e = {
2071         .modes = &friendlyarm_hd702e_mode,
2072         .num_modes = 1,
2073         .size = {
2074                 .width  = 94,
2075                 .height = 151,
2076         },
2077 };
2078
2079 static const struct drm_display_mode giantplus_gpg482739qs5_mode = {
2080         .clock = 9000,
2081         .hdisplay = 480,
2082         .hsync_start = 480 + 5,
2083         .hsync_end = 480 + 5 + 1,
2084         .htotal = 480 + 5 + 1 + 40,
2085         .vdisplay = 272,
2086         .vsync_start = 272 + 8,
2087         .vsync_end = 272 + 8 + 1,
2088         .vtotal = 272 + 8 + 1 + 8,
2089 };
2090
2091 static const struct panel_desc giantplus_gpg482739qs5 = {
2092         .modes = &giantplus_gpg482739qs5_mode,
2093         .num_modes = 1,
2094         .bpc = 8,
2095         .size = {
2096                 .width = 95,
2097                 .height = 54,
2098         },
2099         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2100 };
2101
2102 static const struct display_timing giantplus_gpm940b0_timing = {
2103         .pixelclock = { 13500000, 27000000, 27500000 },
2104         .hactive = { 320, 320, 320 },
2105         .hfront_porch = { 14, 686, 718 },
2106         .hback_porch = { 50, 70, 255 },
2107         .hsync_len = { 1, 1, 1 },
2108         .vactive = { 240, 240, 240 },
2109         .vfront_porch = { 1, 1, 179 },
2110         .vback_porch = { 1, 21, 31 },
2111         .vsync_len = { 1, 1, 6 },
2112         .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
2113 };
2114
2115 static const struct panel_desc giantplus_gpm940b0 = {
2116         .timings = &giantplus_gpm940b0_timing,
2117         .num_timings = 1,
2118         .bpc = 8,
2119         .size = {
2120                 .width = 60,
2121                 .height = 45,
2122         },
2123         .bus_format = MEDIA_BUS_FMT_RGB888_3X8,
2124         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
2125 };
2126
2127 static const struct display_timing hannstar_hsd070pww1_timing = {
2128         .pixelclock = { 64300000, 71100000, 82000000 },
2129         .hactive = { 1280, 1280, 1280 },
2130         .hfront_porch = { 1, 1, 10 },
2131         .hback_porch = { 1, 1, 10 },
2132         /*
2133          * According to the data sheet, the minimum horizontal blanking interval
2134          * is 54 clocks (1 + 52 + 1), but tests with a Nitrogen6X have shown the
2135          * minimum working horizontal blanking interval to be 60 clocks.
2136          */
2137         .hsync_len = { 58, 158, 661 },
2138         .vactive = { 800, 800, 800 },
2139         .vfront_porch = { 1, 1, 10 },
2140         .vback_porch = { 1, 1, 10 },
2141         .vsync_len = { 1, 21, 203 },
2142         .flags = DISPLAY_FLAGS_DE_HIGH,
2143 };
2144
2145 static const struct panel_desc hannstar_hsd070pww1 = {
2146         .timings = &hannstar_hsd070pww1_timing,
2147         .num_timings = 1,
2148         .bpc = 6,
2149         .size = {
2150                 .width = 151,
2151                 .height = 94,
2152         },
2153         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2154         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2155 };
2156
2157 static const struct display_timing hannstar_hsd100pxn1_timing = {
2158         .pixelclock = { 55000000, 65000000, 75000000 },
2159         .hactive = { 1024, 1024, 1024 },
2160         .hfront_porch = { 40, 40, 40 },
2161         .hback_porch = { 220, 220, 220 },
2162         .hsync_len = { 20, 60, 100 },
2163         .vactive = { 768, 768, 768 },
2164         .vfront_porch = { 7, 7, 7 },
2165         .vback_porch = { 21, 21, 21 },
2166         .vsync_len = { 10, 10, 10 },
2167         .flags = DISPLAY_FLAGS_DE_HIGH,
2168 };
2169
2170 static const struct panel_desc hannstar_hsd100pxn1 = {
2171         .timings = &hannstar_hsd100pxn1_timing,
2172         .num_timings = 1,
2173         .bpc = 6,
2174         .size = {
2175                 .width = 203,
2176                 .height = 152,
2177         },
2178         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2179         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2180 };
2181
2182 static const struct drm_display_mode hitachi_tx23d38vm0caa_mode = {
2183         .clock = 33333,
2184         .hdisplay = 800,
2185         .hsync_start = 800 + 85,
2186         .hsync_end = 800 + 85 + 86,
2187         .htotal = 800 + 85 + 86 + 85,
2188         .vdisplay = 480,
2189         .vsync_start = 480 + 16,
2190         .vsync_end = 480 + 16 + 13,
2191         .vtotal = 480 + 16 + 13 + 16,
2192 };
2193
2194 static const struct panel_desc hitachi_tx23d38vm0caa = {
2195         .modes = &hitachi_tx23d38vm0caa_mode,
2196         .num_modes = 1,
2197         .bpc = 6,
2198         .size = {
2199                 .width = 195,
2200                 .height = 117,
2201         },
2202         .delay = {
2203                 .enable = 160,
2204                 .disable = 160,
2205         },
2206 };
2207
2208 static const struct drm_display_mode innolux_at043tn24_mode = {
2209         .clock = 9000,
2210         .hdisplay = 480,
2211         .hsync_start = 480 + 2,
2212         .hsync_end = 480 + 2 + 41,
2213         .htotal = 480 + 2 + 41 + 2,
2214         .vdisplay = 272,
2215         .vsync_start = 272 + 2,
2216         .vsync_end = 272 + 2 + 10,
2217         .vtotal = 272 + 2 + 10 + 2,
2218         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2219 };
2220
2221 static const struct panel_desc innolux_at043tn24 = {
2222         .modes = &innolux_at043tn24_mode,
2223         .num_modes = 1,
2224         .bpc = 8,
2225         .size = {
2226                 .width = 95,
2227                 .height = 54,
2228         },
2229         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2230         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2231 };
2232
2233 static const struct drm_display_mode innolux_at070tn92_mode = {
2234         .clock = 33333,
2235         .hdisplay = 800,
2236         .hsync_start = 800 + 210,
2237         .hsync_end = 800 + 210 + 20,
2238         .htotal = 800 + 210 + 20 + 46,
2239         .vdisplay = 480,
2240         .vsync_start = 480 + 22,
2241         .vsync_end = 480 + 22 + 10,
2242         .vtotal = 480 + 22 + 23 + 10,
2243 };
2244
2245 static const struct panel_desc innolux_at070tn92 = {
2246         .modes = &innolux_at070tn92_mode,
2247         .num_modes = 1,
2248         .size = {
2249                 .width = 154,
2250                 .height = 86,
2251         },
2252         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2253 };
2254
2255 static const struct display_timing innolux_g070y2_l01_timing = {
2256         .pixelclock = { 28000000, 29500000, 32000000 },
2257         .hactive = { 800, 800, 800 },
2258         .hfront_porch = { 61, 91, 141 },
2259         .hback_porch = { 60, 90, 140 },
2260         .hsync_len = { 12, 12, 12 },
2261         .vactive = { 480, 480, 480 },
2262         .vfront_porch = { 4, 9, 30 },
2263         .vback_porch = { 4, 8, 28 },
2264         .vsync_len = { 2, 2, 2 },
2265         .flags = DISPLAY_FLAGS_DE_HIGH,
2266 };
2267
2268 static const struct panel_desc innolux_g070y2_l01 = {
2269         .timings = &innolux_g070y2_l01_timing,
2270         .num_timings = 1,
2271         .bpc = 6,
2272         .size = {
2273                 .width = 152,
2274                 .height = 91,
2275         },
2276         .delay = {
2277                 .prepare = 10,
2278                 .enable = 100,
2279                 .disable = 100,
2280                 .unprepare = 800,
2281         },
2282         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2283         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2284 };
2285
2286 static const struct display_timing innolux_g101ice_l01_timing = {
2287         .pixelclock = { 60400000, 71100000, 74700000 },
2288         .hactive = { 1280, 1280, 1280 },
2289         .hfront_porch = { 41, 80, 100 },
2290         .hback_porch = { 40, 79, 99 },
2291         .hsync_len = { 1, 1, 1 },
2292         .vactive = { 800, 800, 800 },
2293         .vfront_porch = { 5, 11, 14 },
2294         .vback_porch = { 4, 11, 14 },
2295         .vsync_len = { 1, 1, 1 },
2296         .flags = DISPLAY_FLAGS_DE_HIGH,
2297 };
2298
2299 static const struct panel_desc innolux_g101ice_l01 = {
2300         .timings = &innolux_g101ice_l01_timing,
2301         .num_timings = 1,
2302         .bpc = 8,
2303         .size = {
2304                 .width = 217,
2305                 .height = 135,
2306         },
2307         .delay = {
2308                 .enable = 200,
2309                 .disable = 200,
2310         },
2311         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2312         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2313 };
2314
2315 static const struct display_timing innolux_g121i1_l01_timing = {
2316         .pixelclock = { 67450000, 71000000, 74550000 },
2317         .hactive = { 1280, 1280, 1280 },
2318         .hfront_porch = { 40, 80, 160 },
2319         .hback_porch = { 39, 79, 159 },
2320         .hsync_len = { 1, 1, 1 },
2321         .vactive = { 800, 800, 800 },
2322         .vfront_porch = { 5, 11, 100 },
2323         .vback_porch = { 4, 11, 99 },
2324         .vsync_len = { 1, 1, 1 },
2325 };
2326
2327 static const struct panel_desc innolux_g121i1_l01 = {
2328         .timings = &innolux_g121i1_l01_timing,
2329         .num_timings = 1,
2330         .bpc = 6,
2331         .size = {
2332                 .width = 261,
2333                 .height = 163,
2334         },
2335         .delay = {
2336                 .enable = 200,
2337                 .disable = 20,
2338         },
2339         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2340         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2341 };
2342
2343 static const struct drm_display_mode innolux_g121x1_l03_mode = {
2344         .clock = 65000,
2345         .hdisplay = 1024,
2346         .hsync_start = 1024 + 0,
2347         .hsync_end = 1024 + 1,
2348         .htotal = 1024 + 0 + 1 + 320,
2349         .vdisplay = 768,
2350         .vsync_start = 768 + 38,
2351         .vsync_end = 768 + 38 + 1,
2352         .vtotal = 768 + 38 + 1 + 0,
2353         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2354 };
2355
2356 static const struct panel_desc innolux_g121x1_l03 = {
2357         .modes = &innolux_g121x1_l03_mode,
2358         .num_modes = 1,
2359         .bpc = 6,
2360         .size = {
2361                 .width = 246,
2362                 .height = 185,
2363         },
2364         .delay = {
2365                 .enable = 200,
2366                 .unprepare = 200,
2367                 .disable = 400,
2368         },
2369 };
2370
2371 /*
2372  * Datasheet specifies that at 60 Hz refresh rate:
2373  * - total horizontal time: { 1506, 1592, 1716 }
2374  * - total vertical time: { 788, 800, 868 }
2375  *
2376  * ...but doesn't go into exactly how that should be split into a front
2377  * porch, back porch, or sync length.  For now we'll leave a single setting
2378  * here which allows a bit of tweaking of the pixel clock at the expense of
2379  * refresh rate.
2380  */
2381 static const struct display_timing innolux_n116bge_timing = {
2382         .pixelclock = { 72600000, 76420000, 80240000 },
2383         .hactive = { 1366, 1366, 1366 },
2384         .hfront_porch = { 136, 136, 136 },
2385         .hback_porch = { 60, 60, 60 },
2386         .hsync_len = { 30, 30, 30 },
2387         .vactive = { 768, 768, 768 },
2388         .vfront_porch = { 8, 8, 8 },
2389         .vback_porch = { 12, 12, 12 },
2390         .vsync_len = { 12, 12, 12 },
2391         .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
2392 };
2393
2394 static const struct panel_desc innolux_n116bge = {
2395         .timings = &innolux_n116bge_timing,
2396         .num_timings = 1,
2397         .bpc = 6,
2398         .size = {
2399                 .width = 256,
2400                 .height = 144,
2401         },
2402 };
2403
2404 static const struct drm_display_mode innolux_n125hce_gn1_mode = {
2405         .clock = 162000,
2406         .hdisplay = 1920,
2407         .hsync_start = 1920 + 40,
2408         .hsync_end = 1920 + 40 + 40,
2409         .htotal = 1920 + 40 + 40 + 80,
2410         .vdisplay = 1080,
2411         .vsync_start = 1080 + 4,
2412         .vsync_end = 1080 + 4 + 4,
2413         .vtotal = 1080 + 4 + 4 + 24,
2414 };
2415
2416 static const struct panel_desc innolux_n125hce_gn1 = {
2417         .modes = &innolux_n125hce_gn1_mode,
2418         .num_modes = 1,
2419         .bpc = 8,
2420         .size = {
2421                 .width = 276,
2422                 .height = 155,
2423         },
2424         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2425         .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
2426         .connector_type = DRM_MODE_CONNECTOR_eDP,
2427 };
2428
2429 static const struct drm_display_mode innolux_n156bge_l21_mode = {
2430         .clock = 69300,
2431         .hdisplay = 1366,
2432         .hsync_start = 1366 + 16,
2433         .hsync_end = 1366 + 16 + 34,
2434         .htotal = 1366 + 16 + 34 + 50,
2435         .vdisplay = 768,
2436         .vsync_start = 768 + 2,
2437         .vsync_end = 768 + 2 + 6,
2438         .vtotal = 768 + 2 + 6 + 12,
2439 };
2440
2441 static const struct panel_desc innolux_n156bge_l21 = {
2442         .modes = &innolux_n156bge_l21_mode,
2443         .num_modes = 1,
2444         .bpc = 6,
2445         .size = {
2446                 .width = 344,
2447                 .height = 193,
2448         },
2449         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2450         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2451         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2452 };
2453
2454 static const struct drm_display_mode innolux_p120zdg_bf1_mode = {
2455         .clock = 206016,
2456         .hdisplay = 2160,
2457         .hsync_start = 2160 + 48,
2458         .hsync_end = 2160 + 48 + 32,
2459         .htotal = 2160 + 48 + 32 + 80,
2460         .vdisplay = 1440,
2461         .vsync_start = 1440 + 3,
2462         .vsync_end = 1440 + 3 + 10,
2463         .vtotal = 1440 + 3 + 10 + 27,
2464         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2465 };
2466
2467 static const struct panel_desc innolux_p120zdg_bf1 = {
2468         .modes = &innolux_p120zdg_bf1_mode,
2469         .num_modes = 1,
2470         .bpc = 8,
2471         .size = {
2472                 .width = 254,
2473                 .height = 169,
2474         },
2475         .delay = {
2476                 .hpd_absent_delay = 200,
2477                 .unprepare = 500,
2478         },
2479 };
2480
2481 static const struct drm_display_mode innolux_zj070na_01p_mode = {
2482         .clock = 51501,
2483         .hdisplay = 1024,
2484         .hsync_start = 1024 + 128,
2485         .hsync_end = 1024 + 128 + 64,
2486         .htotal = 1024 + 128 + 64 + 128,
2487         .vdisplay = 600,
2488         .vsync_start = 600 + 16,
2489         .vsync_end = 600 + 16 + 4,
2490         .vtotal = 600 + 16 + 4 + 16,
2491 };
2492
2493 static const struct panel_desc innolux_zj070na_01p = {
2494         .modes = &innolux_zj070na_01p_mode,
2495         .num_modes = 1,
2496         .bpc = 6,
2497         .size = {
2498                 .width = 154,
2499                 .height = 90,
2500         },
2501 };
2502
2503 static const struct drm_display_mode ivo_m133nwf4_r0_mode = {
2504         .clock = 138778,
2505         .hdisplay = 1920,
2506         .hsync_start = 1920 + 24,
2507         .hsync_end = 1920 + 24 + 48,
2508         .htotal = 1920 + 24 + 48 + 88,
2509         .vdisplay = 1080,
2510         .vsync_start = 1080 + 3,
2511         .vsync_end = 1080 + 3 + 12,
2512         .vtotal = 1080 + 3 + 12 + 17,
2513         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2514 };
2515
2516 static const struct panel_desc ivo_m133nwf4_r0 = {
2517         .modes = &ivo_m133nwf4_r0_mode,
2518         .num_modes = 1,
2519         .bpc = 8,
2520         .size = {
2521                 .width = 294,
2522                 .height = 165,
2523         },
2524         .delay = {
2525                 .hpd_absent_delay = 200,
2526                 .unprepare = 500,
2527         },
2528         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2529         .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
2530         .connector_type = DRM_MODE_CONNECTOR_eDP,
2531 };
2532
2533 static const struct drm_display_mode kingdisplay_kd116n21_30nv_a010_mode = {
2534         .clock = 81000,
2535         .hdisplay = 1366,
2536         .hsync_start = 1366 + 40,
2537         .hsync_end = 1366 + 40 + 32,
2538         .htotal = 1366 + 40 + 32 + 62,
2539         .vdisplay = 768,
2540         .vsync_start = 768 + 5,
2541         .vsync_end = 768 + 5 + 5,
2542         .vtotal = 768 + 5 + 5 + 122,
2543         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2544 };
2545
2546 static const struct panel_desc kingdisplay_kd116n21_30nv_a010 = {
2547         .modes = &kingdisplay_kd116n21_30nv_a010_mode,
2548         .num_modes = 1,
2549         .bpc = 6,
2550         .size = {
2551                 .width = 256,
2552                 .height = 144,
2553         },
2554         .delay = {
2555                 .hpd_absent_delay = 200,
2556         },
2557         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2558         .connector_type = DRM_MODE_CONNECTOR_eDP,
2559 };
2560
2561 static const struct display_timing koe_tx14d24vm1bpa_timing = {
2562         .pixelclock = { 5580000, 5850000, 6200000 },
2563         .hactive = { 320, 320, 320 },
2564         .hfront_porch = { 30, 30, 30 },
2565         .hback_porch = { 30, 30, 30 },
2566         .hsync_len = { 1, 5, 17 },
2567         .vactive = { 240, 240, 240 },
2568         .vfront_porch = { 6, 6, 6 },
2569         .vback_porch = { 5, 5, 5 },
2570         .vsync_len = { 1, 2, 11 },
2571         .flags = DISPLAY_FLAGS_DE_HIGH,
2572 };
2573
2574 static const struct panel_desc koe_tx14d24vm1bpa = {
2575         .timings = &koe_tx14d24vm1bpa_timing,
2576         .num_timings = 1,
2577         .bpc = 6,
2578         .size = {
2579                 .width = 115,
2580                 .height = 86,
2581         },
2582 };
2583
2584 static const struct display_timing koe_tx26d202vm0bwa_timing = {
2585         .pixelclock = { 151820000, 156720000, 159780000 },
2586         .hactive = { 1920, 1920, 1920 },
2587         .hfront_porch = { 105, 130, 142 },
2588         .hback_porch = { 45, 70, 82 },
2589         .hsync_len = { 30, 30, 30 },
2590         .vactive = { 1200, 1200, 1200},
2591         .vfront_porch = { 3, 5, 10 },
2592         .vback_porch = { 2, 5, 10 },
2593         .vsync_len = { 5, 5, 5 },
2594 };
2595
2596 static const struct panel_desc koe_tx26d202vm0bwa = {
2597         .timings = &koe_tx26d202vm0bwa_timing,
2598         .num_timings = 1,
2599         .bpc = 8,
2600         .size = {
2601                 .width = 217,
2602                 .height = 136,
2603         },
2604         .delay = {
2605                 .prepare = 1000,
2606                 .enable = 1000,
2607                 .unprepare = 1000,
2608                 .disable = 1000,
2609         },
2610         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2611         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2612         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2613 };
2614
2615 static const struct display_timing koe_tx31d200vm0baa_timing = {
2616         .pixelclock = { 39600000, 43200000, 48000000 },
2617         .hactive = { 1280, 1280, 1280 },
2618         .hfront_porch = { 16, 36, 56 },
2619         .hback_porch = { 16, 36, 56 },
2620         .hsync_len = { 8, 8, 8 },
2621         .vactive = { 480, 480, 480 },
2622         .vfront_porch = { 6, 21, 33 },
2623         .vback_porch = { 6, 21, 33 },
2624         .vsync_len = { 8, 8, 8 },
2625         .flags = DISPLAY_FLAGS_DE_HIGH,
2626 };
2627
2628 static const struct panel_desc koe_tx31d200vm0baa = {
2629         .timings = &koe_tx31d200vm0baa_timing,
2630         .num_timings = 1,
2631         .bpc = 6,
2632         .size = {
2633                 .width = 292,
2634                 .height = 109,
2635         },
2636         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
2637         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2638 };
2639
2640 static const struct display_timing kyo_tcg121xglp_timing = {
2641         .pixelclock = { 52000000, 65000000, 71000000 },
2642         .hactive = { 1024, 1024, 1024 },
2643         .hfront_porch = { 2, 2, 2 },
2644         .hback_porch = { 2, 2, 2 },
2645         .hsync_len = { 86, 124, 244 },
2646         .vactive = { 768, 768, 768 },
2647         .vfront_porch = { 2, 2, 2 },
2648         .vback_porch = { 2, 2, 2 },
2649         .vsync_len = { 6, 34, 73 },
2650         .flags = DISPLAY_FLAGS_DE_HIGH,
2651 };
2652
2653 static const struct panel_desc kyo_tcg121xglp = {
2654         .timings = &kyo_tcg121xglp_timing,
2655         .num_timings = 1,
2656         .bpc = 8,
2657         .size = {
2658                 .width = 246,
2659                 .height = 184,
2660         },
2661         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2662         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2663 };
2664
2665 static const struct drm_display_mode lemaker_bl035_rgb_002_mode = {
2666         .clock = 7000,
2667         .hdisplay = 320,
2668         .hsync_start = 320 + 20,
2669         .hsync_end = 320 + 20 + 30,
2670         .htotal = 320 + 20 + 30 + 38,
2671         .vdisplay = 240,
2672         .vsync_start = 240 + 4,
2673         .vsync_end = 240 + 4 + 3,
2674         .vtotal = 240 + 4 + 3 + 15,
2675 };
2676
2677 static const struct panel_desc lemaker_bl035_rgb_002 = {
2678         .modes = &lemaker_bl035_rgb_002_mode,
2679         .num_modes = 1,
2680         .size = {
2681                 .width = 70,
2682                 .height = 52,
2683         },
2684         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2685         .bus_flags = DRM_BUS_FLAG_DE_LOW,
2686 };
2687
2688 static const struct drm_display_mode lg_lb070wv8_mode = {
2689         .clock = 33246,
2690         .hdisplay = 800,
2691         .hsync_start = 800 + 88,
2692         .hsync_end = 800 + 88 + 80,
2693         .htotal = 800 + 88 + 80 + 88,
2694         .vdisplay = 480,
2695         .vsync_start = 480 + 10,
2696         .vsync_end = 480 + 10 + 25,
2697         .vtotal = 480 + 10 + 25 + 10,
2698 };
2699
2700 static const struct panel_desc lg_lb070wv8 = {
2701         .modes = &lg_lb070wv8_mode,
2702         .num_modes = 1,
2703         .bpc = 8,
2704         .size = {
2705                 .width = 151,
2706                 .height = 91,
2707         },
2708         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2709         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2710 };
2711
2712 static const struct drm_display_mode lg_lp079qx1_sp0v_mode = {
2713         .clock = 200000,
2714         .hdisplay = 1536,
2715         .hsync_start = 1536 + 12,
2716         .hsync_end = 1536 + 12 + 16,
2717         .htotal = 1536 + 12 + 16 + 48,
2718         .vdisplay = 2048,
2719         .vsync_start = 2048 + 8,
2720         .vsync_end = 2048 + 8 + 4,
2721         .vtotal = 2048 + 8 + 4 + 8,
2722         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2723 };
2724
2725 static const struct panel_desc lg_lp079qx1_sp0v = {
2726         .modes = &lg_lp079qx1_sp0v_mode,
2727         .num_modes = 1,
2728         .size = {
2729                 .width = 129,
2730                 .height = 171,
2731         },
2732 };
2733
2734 static const struct drm_display_mode lg_lp097qx1_spa1_mode = {
2735         .clock = 205210,
2736         .hdisplay = 2048,
2737         .hsync_start = 2048 + 150,
2738         .hsync_end = 2048 + 150 + 5,
2739         .htotal = 2048 + 150 + 5 + 5,
2740         .vdisplay = 1536,
2741         .vsync_start = 1536 + 3,
2742         .vsync_end = 1536 + 3 + 1,
2743         .vtotal = 1536 + 3 + 1 + 9,
2744 };
2745
2746 static const struct panel_desc lg_lp097qx1_spa1 = {
2747         .modes = &lg_lp097qx1_spa1_mode,
2748         .num_modes = 1,
2749         .size = {
2750                 .width = 208,
2751                 .height = 147,
2752         },
2753 };
2754
2755 static const struct drm_display_mode lg_lp120up1_mode = {
2756         .clock = 162300,
2757         .hdisplay = 1920,
2758         .hsync_start = 1920 + 40,
2759         .hsync_end = 1920 + 40 + 40,
2760         .htotal = 1920 + 40 + 40+ 80,
2761         .vdisplay = 1280,
2762         .vsync_start = 1280 + 4,
2763         .vsync_end = 1280 + 4 + 4,
2764         .vtotal = 1280 + 4 + 4 + 12,
2765 };
2766
2767 static const struct panel_desc lg_lp120up1 = {
2768         .modes = &lg_lp120up1_mode,
2769         .num_modes = 1,
2770         .bpc = 8,
2771         .size = {
2772                 .width = 267,
2773                 .height = 183,
2774         },
2775         .connector_type = DRM_MODE_CONNECTOR_eDP,
2776 };
2777
2778 static const struct drm_display_mode lg_lp129qe_mode = {
2779         .clock = 285250,
2780         .hdisplay = 2560,
2781         .hsync_start = 2560 + 48,
2782         .hsync_end = 2560 + 48 + 32,
2783         .htotal = 2560 + 48 + 32 + 80,
2784         .vdisplay = 1700,
2785         .vsync_start = 1700 + 3,
2786         .vsync_end = 1700 + 3 + 10,
2787         .vtotal = 1700 + 3 + 10 + 36,
2788 };
2789
2790 static const struct panel_desc lg_lp129qe = {
2791         .modes = &lg_lp129qe_mode,
2792         .num_modes = 1,
2793         .bpc = 8,
2794         .size = {
2795                 .width = 272,
2796                 .height = 181,
2797         },
2798 };
2799
2800 static const struct display_timing logictechno_lt161010_2nh_timing = {
2801         .pixelclock = { 26400000, 33300000, 46800000 },
2802         .hactive = { 800, 800, 800 },
2803         .hfront_porch = { 16, 210, 354 },
2804         .hback_porch = { 46, 46, 46 },
2805         .hsync_len = { 1, 20, 40 },
2806         .vactive = { 480, 480, 480 },
2807         .vfront_porch = { 7, 22, 147 },
2808         .vback_porch = { 23, 23, 23 },
2809         .vsync_len = { 1, 10, 20 },
2810         .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2811                  DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2812                  DISPLAY_FLAGS_SYNC_POSEDGE,
2813 };
2814
2815 static const struct panel_desc logictechno_lt161010_2nh = {
2816         .timings = &logictechno_lt161010_2nh_timing,
2817         .num_timings = 1,
2818         .size = {
2819                 .width = 154,
2820                 .height = 86,
2821         },
2822         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2823         .bus_flags = DRM_BUS_FLAG_DE_HIGH |
2824                      DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
2825                      DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
2826         .connector_type = DRM_MODE_CONNECTOR_DPI,
2827 };
2828
2829 static const struct display_timing logictechno_lt170410_2whc_timing = {
2830         .pixelclock = { 68900000, 71100000, 73400000 },
2831         .hactive = { 1280, 1280, 1280 },
2832         .hfront_porch = { 23, 60, 71 },
2833         .hback_porch = { 23, 60, 71 },
2834         .hsync_len = { 15, 40, 47 },
2835         .vactive = { 800, 800, 800 },
2836         .vfront_porch = { 5, 7, 10 },
2837         .vback_porch = { 5, 7, 10 },
2838         .vsync_len = { 6, 9, 12 },
2839         .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
2840                  DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE |
2841                  DISPLAY_FLAGS_SYNC_POSEDGE,
2842 };
2843
2844 static const struct panel_desc logictechno_lt170410_2whc = {
2845         .timings = &logictechno_lt170410_2whc_timing,
2846         .num_timings = 1,
2847         .size = {
2848                 .width = 217,
2849                 .height = 136,
2850         },
2851         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2852         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2853         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2854 };
2855
2856 static const struct drm_display_mode mitsubishi_aa070mc01_mode = {
2857         .clock = 30400,
2858         .hdisplay = 800,
2859         .hsync_start = 800 + 0,
2860         .hsync_end = 800 + 1,
2861         .htotal = 800 + 0 + 1 + 160,
2862         .vdisplay = 480,
2863         .vsync_start = 480 + 0,
2864         .vsync_end = 480 + 48 + 1,
2865         .vtotal = 480 + 48 + 1 + 0,
2866         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
2867 };
2868
2869 static const struct drm_display_mode logicpd_type_28_mode = {
2870         .clock = 9107,
2871         .hdisplay = 480,
2872         .hsync_start = 480 + 3,
2873         .hsync_end = 480 + 3 + 42,
2874         .htotal = 480 + 3 + 42 + 2,
2875
2876         .vdisplay = 272,
2877         .vsync_start = 272 + 2,
2878         .vsync_end = 272 + 2 + 11,
2879         .vtotal = 272 + 2 + 11 + 3,
2880         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
2881 };
2882
2883 static const struct panel_desc logicpd_type_28 = {
2884         .modes = &logicpd_type_28_mode,
2885         .num_modes = 1,
2886         .bpc = 8,
2887         .size = {
2888                 .width = 105,
2889                 .height = 67,
2890         },
2891         .delay = {
2892                 .prepare = 200,
2893                 .enable = 200,
2894                 .unprepare = 200,
2895                 .disable = 200,
2896         },
2897         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2898         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
2899                      DRM_BUS_FLAG_SYNC_DRIVE_NEGEDGE,
2900         .connector_type = DRM_MODE_CONNECTOR_DPI,
2901 };
2902
2903 static const struct panel_desc mitsubishi_aa070mc01 = {
2904         .modes = &mitsubishi_aa070mc01_mode,
2905         .num_modes = 1,
2906         .bpc = 8,
2907         .size = {
2908                 .width = 152,
2909                 .height = 91,
2910         },
2911
2912         .delay = {
2913                 .enable = 200,
2914                 .unprepare = 200,
2915                 .disable = 400,
2916         },
2917         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2918         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2919         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
2920 };
2921
2922 static const struct display_timing nec_nl12880bc20_05_timing = {
2923         .pixelclock = { 67000000, 71000000, 75000000 },
2924         .hactive = { 1280, 1280, 1280 },
2925         .hfront_porch = { 2, 30, 30 },
2926         .hback_porch = { 6, 100, 100 },
2927         .hsync_len = { 2, 30, 30 },
2928         .vactive = { 800, 800, 800 },
2929         .vfront_porch = { 5, 5, 5 },
2930         .vback_porch = { 11, 11, 11 },
2931         .vsync_len = { 7, 7, 7 },
2932 };
2933
2934 static const struct panel_desc nec_nl12880bc20_05 = {
2935         .timings = &nec_nl12880bc20_05_timing,
2936         .num_timings = 1,
2937         .bpc = 8,
2938         .size = {
2939                 .width = 261,
2940                 .height = 163,
2941         },
2942         .delay = {
2943                 .enable = 50,
2944                 .disable = 50,
2945         },
2946         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
2947         .connector_type = DRM_MODE_CONNECTOR_LVDS,
2948 };
2949
2950 static const struct drm_display_mode nec_nl4827hc19_05b_mode = {
2951         .clock = 10870,
2952         .hdisplay = 480,
2953         .hsync_start = 480 + 2,
2954         .hsync_end = 480 + 2 + 41,
2955         .htotal = 480 + 2 + 41 + 2,
2956         .vdisplay = 272,
2957         .vsync_start = 272 + 2,
2958         .vsync_end = 272 + 2 + 4,
2959         .vtotal = 272 + 2 + 4 + 2,
2960         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
2961 };
2962
2963 static const struct panel_desc nec_nl4827hc19_05b = {
2964         .modes = &nec_nl4827hc19_05b_mode,
2965         .num_modes = 1,
2966         .bpc = 8,
2967         .size = {
2968                 .width = 95,
2969                 .height = 54,
2970         },
2971         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
2972         .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
2973 };
2974
2975 static const struct drm_display_mode netron_dy_e231732_mode = {
2976         .clock = 66000,
2977         .hdisplay = 1024,
2978         .hsync_start = 1024 + 160,
2979         .hsync_end = 1024 + 160 + 70,
2980         .htotal = 1024 + 160 + 70 + 90,
2981         .vdisplay = 600,
2982         .vsync_start = 600 + 127,
2983         .vsync_end = 600 + 127 + 20,
2984         .vtotal = 600 + 127 + 20 + 3,
2985 };
2986
2987 static const struct panel_desc netron_dy_e231732 = {
2988         .modes = &netron_dy_e231732_mode,
2989         .num_modes = 1,
2990         .size = {
2991                 .width = 154,
2992                 .height = 87,
2993         },
2994         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
2995 };
2996
2997 static const struct drm_display_mode neweast_wjfh116008a_modes[] = {
2998         {
2999                 .clock = 138500,
3000                 .hdisplay = 1920,
3001                 .hsync_start = 1920 + 48,
3002                 .hsync_end = 1920 + 48 + 32,
3003                 .htotal = 1920 + 48 + 32 + 80,
3004                 .vdisplay = 1080,
3005                 .vsync_start = 1080 + 3,
3006                 .vsync_end = 1080 + 3 + 5,
3007                 .vtotal = 1080 + 3 + 5 + 23,
3008                 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3009         }, {
3010                 .clock = 110920,
3011                 .hdisplay = 1920,
3012                 .hsync_start = 1920 + 48,
3013                 .hsync_end = 1920 + 48 + 32,
3014                 .htotal = 1920 + 48 + 32 + 80,
3015                 .vdisplay = 1080,
3016                 .vsync_start = 1080 + 3,
3017                 .vsync_end = 1080 + 3 + 5,
3018                 .vtotal = 1080 + 3 + 5 + 23,
3019                 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3020         }
3021 };
3022
3023 static const struct panel_desc neweast_wjfh116008a = {
3024         .modes = neweast_wjfh116008a_modes,
3025         .num_modes = 2,
3026         .bpc = 6,
3027         .size = {
3028                 .width = 260,
3029                 .height = 150,
3030         },
3031         .delay = {
3032                 .prepare = 110,
3033                 .enable = 20,
3034                 .unprepare = 500,
3035         },
3036         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3037         .connector_type = DRM_MODE_CONNECTOR_eDP,
3038 };
3039
3040 static const struct drm_display_mode newhaven_nhd_43_480272ef_atxl_mode = {
3041         .clock = 9000,
3042         .hdisplay = 480,
3043         .hsync_start = 480 + 2,
3044         .hsync_end = 480 + 2 + 41,
3045         .htotal = 480 + 2 + 41 + 2,
3046         .vdisplay = 272,
3047         .vsync_start = 272 + 2,
3048         .vsync_end = 272 + 2 + 10,
3049         .vtotal = 272 + 2 + 10 + 2,
3050         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3051 };
3052
3053 static const struct panel_desc newhaven_nhd_43_480272ef_atxl = {
3054         .modes = &newhaven_nhd_43_480272ef_atxl_mode,
3055         .num_modes = 1,
3056         .bpc = 8,
3057         .size = {
3058                 .width = 95,
3059                 .height = 54,
3060         },
3061         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3062         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
3063                      DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
3064         .connector_type = DRM_MODE_CONNECTOR_DPI,
3065 };
3066
3067 static const struct display_timing nlt_nl192108ac18_02d_timing = {
3068         .pixelclock = { 130000000, 148350000, 163000000 },
3069         .hactive = { 1920, 1920, 1920 },
3070         .hfront_porch = { 80, 100, 100 },
3071         .hback_porch = { 100, 120, 120 },
3072         .hsync_len = { 50, 60, 60 },
3073         .vactive = { 1080, 1080, 1080 },
3074         .vfront_porch = { 12, 30, 30 },
3075         .vback_porch = { 4, 10, 10 },
3076         .vsync_len = { 4, 5, 5 },
3077 };
3078
3079 static const struct panel_desc nlt_nl192108ac18_02d = {
3080         .timings = &nlt_nl192108ac18_02d_timing,
3081         .num_timings = 1,
3082         .bpc = 8,
3083         .size = {
3084                 .width = 344,
3085                 .height = 194,
3086         },
3087         .delay = {
3088                 .unprepare = 500,
3089         },
3090         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3091         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3092 };
3093
3094 static const struct drm_display_mode nvd_9128_mode = {
3095         .clock = 29500,
3096         .hdisplay = 800,
3097         .hsync_start = 800 + 130,
3098         .hsync_end = 800 + 130 + 98,
3099         .htotal = 800 + 0 + 130 + 98,
3100         .vdisplay = 480,
3101         .vsync_start = 480 + 10,
3102         .vsync_end = 480 + 10 + 50,
3103         .vtotal = 480 + 0 + 10 + 50,
3104 };
3105
3106 static const struct panel_desc nvd_9128 = {
3107         .modes = &nvd_9128_mode,
3108         .num_modes = 1,
3109         .bpc = 8,
3110         .size = {
3111                 .width = 156,
3112                 .height = 88,
3113         },
3114         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3115         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3116 };
3117
3118 static const struct display_timing okaya_rs800480t_7x0gp_timing = {
3119         .pixelclock = { 30000000, 30000000, 40000000 },
3120         .hactive = { 800, 800, 800 },
3121         .hfront_porch = { 40, 40, 40 },
3122         .hback_porch = { 40, 40, 40 },
3123         .hsync_len = { 1, 48, 48 },
3124         .vactive = { 480, 480, 480 },
3125         .vfront_porch = { 13, 13, 13 },
3126         .vback_porch = { 29, 29, 29 },
3127         .vsync_len = { 3, 3, 3 },
3128         .flags = DISPLAY_FLAGS_DE_HIGH,
3129 };
3130
3131 static const struct panel_desc okaya_rs800480t_7x0gp = {
3132         .timings = &okaya_rs800480t_7x0gp_timing,
3133         .num_timings = 1,
3134         .bpc = 6,
3135         .size = {
3136                 .width = 154,
3137                 .height = 87,
3138         },
3139         .delay = {
3140                 .prepare = 41,
3141                 .enable = 50,
3142                 .unprepare = 41,
3143                 .disable = 50,
3144         },
3145         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3146 };
3147
3148 static const struct drm_display_mode olimex_lcd_olinuxino_43ts_mode = {
3149         .clock = 9000,
3150         .hdisplay = 480,
3151         .hsync_start = 480 + 5,
3152         .hsync_end = 480 + 5 + 30,
3153         .htotal = 480 + 5 + 30 + 10,
3154         .vdisplay = 272,
3155         .vsync_start = 272 + 8,
3156         .vsync_end = 272 + 8 + 5,
3157         .vtotal = 272 + 8 + 5 + 3,
3158 };
3159
3160 static const struct panel_desc olimex_lcd_olinuxino_43ts = {
3161         .modes = &olimex_lcd_olinuxino_43ts_mode,
3162         .num_modes = 1,
3163         .size = {
3164                 .width = 95,
3165                 .height = 54,
3166         },
3167         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3168 };
3169
3170 /*
3171  * 800x480 CVT. The panel appears to be quite accepting, at least as far as
3172  * pixel clocks, but this is the timing that was being used in the Adafruit
3173  * installation instructions.
3174  */
3175 static const struct drm_display_mode ontat_yx700wv03_mode = {
3176         .clock = 29500,
3177         .hdisplay = 800,
3178         .hsync_start = 824,
3179         .hsync_end = 896,
3180         .htotal = 992,
3181         .vdisplay = 480,
3182         .vsync_start = 483,
3183         .vsync_end = 493,
3184         .vtotal = 500,
3185         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3186 };
3187
3188 /*
3189  * Specification at:
3190  * https://www.adafruit.com/images/product-files/2406/c3163.pdf
3191  */
3192 static const struct panel_desc ontat_yx700wv03 = {
3193         .modes = &ontat_yx700wv03_mode,
3194         .num_modes = 1,
3195         .bpc = 8,
3196         .size = {
3197                 .width = 154,
3198                 .height = 83,
3199         },
3200         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3201 };
3202
3203 static const struct drm_display_mode ortustech_com37h3m_mode  = {
3204         .clock = 22230,
3205         .hdisplay = 480,
3206         .hsync_start = 480 + 40,
3207         .hsync_end = 480 + 40 + 10,
3208         .htotal = 480 + 40 + 10 + 40,
3209         .vdisplay = 640,
3210         .vsync_start = 640 + 4,
3211         .vsync_end = 640 + 4 + 2,
3212         .vtotal = 640 + 4 + 2 + 4,
3213         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3214 };
3215
3216 static const struct panel_desc ortustech_com37h3m = {
3217         .modes = &ortustech_com37h3m_mode,
3218         .num_modes = 1,
3219         .bpc = 8,
3220         .size = {
3221                 .width = 56,    /* 56.16mm */
3222                 .height = 75,   /* 74.88mm */
3223         },
3224         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3225         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
3226                      DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
3227 };
3228
3229 static const struct drm_display_mode ortustech_com43h4m85ulc_mode  = {
3230         .clock = 25000,
3231         .hdisplay = 480,
3232         .hsync_start = 480 + 10,
3233         .hsync_end = 480 + 10 + 10,
3234         .htotal = 480 + 10 + 10 + 15,
3235         .vdisplay = 800,
3236         .vsync_start = 800 + 3,
3237         .vsync_end = 800 + 3 + 3,
3238         .vtotal = 800 + 3 + 3 + 3,
3239 };
3240
3241 static const struct panel_desc ortustech_com43h4m85ulc = {
3242         .modes = &ortustech_com43h4m85ulc_mode,
3243         .num_modes = 1,
3244         .bpc = 6,
3245         .size = {
3246                 .width = 56,
3247                 .height = 93,
3248         },
3249         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3250         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
3251         .connector_type = DRM_MODE_CONNECTOR_DPI,
3252 };
3253
3254 static const struct drm_display_mode osddisplays_osd070t1718_19ts_mode  = {
3255         .clock = 33000,
3256         .hdisplay = 800,
3257         .hsync_start = 800 + 210,
3258         .hsync_end = 800 + 210 + 30,
3259         .htotal = 800 + 210 + 30 + 16,
3260         .vdisplay = 480,
3261         .vsync_start = 480 + 22,
3262         .vsync_end = 480 + 22 + 13,
3263         .vtotal = 480 + 22 + 13 + 10,
3264         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3265 };
3266
3267 static const struct panel_desc osddisplays_osd070t1718_19ts = {
3268         .modes = &osddisplays_osd070t1718_19ts_mode,
3269         .num_modes = 1,
3270         .bpc = 8,
3271         .size = {
3272                 .width = 152,
3273                 .height = 91,
3274         },
3275         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3276         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE |
3277                 DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
3278         .connector_type = DRM_MODE_CONNECTOR_DPI,
3279 };
3280
3281 static const struct drm_display_mode pda_91_00156_a0_mode = {
3282         .clock = 33300,
3283         .hdisplay = 800,
3284         .hsync_start = 800 + 1,
3285         .hsync_end = 800 + 1 + 64,
3286         .htotal = 800 + 1 + 64 + 64,
3287         .vdisplay = 480,
3288         .vsync_start = 480 + 1,
3289         .vsync_end = 480 + 1 + 23,
3290         .vtotal = 480 + 1 + 23 + 22,
3291 };
3292
3293 static const struct panel_desc pda_91_00156_a0  = {
3294         .modes = &pda_91_00156_a0_mode,
3295         .num_modes = 1,
3296         .size = {
3297                 .width = 152,
3298                 .height = 91,
3299         },
3300         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3301 };
3302
3303 static const struct drm_display_mode powertip_ph800480t013_idf02_mode = {
3304         .clock = 24750,
3305         .hdisplay = 800,
3306         .hsync_start = 800 + 54,
3307         .hsync_end = 800 + 54 + 2,
3308         .htotal = 800 + 54 + 2 + 44,
3309         .vdisplay = 480,
3310         .vsync_start = 480 + 49,
3311         .vsync_end = 480 + 49 + 2,
3312         .vtotal = 480 + 49 + 2 + 22,
3313 };
3314
3315 static const struct panel_desc powertip_ph800480t013_idf02  = {
3316         .modes = &powertip_ph800480t013_idf02_mode,
3317         .num_modes = 1,
3318         .size = {
3319                 .width = 152,
3320                 .height = 91,
3321         },
3322         .bus_flags = DRM_BUS_FLAG_DE_HIGH |
3323                      DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
3324                      DRM_BUS_FLAG_SYNC_SAMPLE_NEGEDGE,
3325         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3326         .connector_type = DRM_MODE_CONNECTOR_DPI,
3327 };
3328
3329 static const struct drm_display_mode qd43003c0_40_mode = {
3330         .clock = 9000,
3331         .hdisplay = 480,
3332         .hsync_start = 480 + 8,
3333         .hsync_end = 480 + 8 + 4,
3334         .htotal = 480 + 8 + 4 + 39,
3335         .vdisplay = 272,
3336         .vsync_start = 272 + 4,
3337         .vsync_end = 272 + 4 + 10,
3338         .vtotal = 272 + 4 + 10 + 2,
3339 };
3340
3341 static const struct panel_desc qd43003c0_40 = {
3342         .modes = &qd43003c0_40_mode,
3343         .num_modes = 1,
3344         .bpc = 8,
3345         .size = {
3346                 .width = 95,
3347                 .height = 53,
3348         },
3349         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3350 };
3351
3352 static const struct display_timing rocktech_rk070er9427_timing = {
3353         .pixelclock = { 26400000, 33300000, 46800000 },
3354         .hactive = { 800, 800, 800 },
3355         .hfront_porch = { 16, 210, 354 },
3356         .hback_porch = { 46, 46, 46 },
3357         .hsync_len = { 1, 1, 1 },
3358         .vactive = { 480, 480, 480 },
3359         .vfront_porch = { 7, 22, 147 },
3360         .vback_porch = { 23, 23, 23 },
3361         .vsync_len = { 1, 1, 1 },
3362         .flags = DISPLAY_FLAGS_DE_HIGH,
3363 };
3364
3365 static const struct panel_desc rocktech_rk070er9427 = {
3366         .timings = &rocktech_rk070er9427_timing,
3367         .num_timings = 1,
3368         .bpc = 6,
3369         .size = {
3370                 .width = 154,
3371                 .height = 86,
3372         },
3373         .delay = {
3374                 .prepare = 41,
3375                 .enable = 50,
3376                 .unprepare = 41,
3377                 .disable = 50,
3378         },
3379         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3380 };
3381
3382 static const struct drm_display_mode rocktech_rk101ii01d_ct_mode = {
3383         .clock = 71100,
3384         .hdisplay = 1280,
3385         .hsync_start = 1280 + 48,
3386         .hsync_end = 1280 + 48 + 32,
3387         .htotal = 1280 + 48 + 32 + 80,
3388         .vdisplay = 800,
3389         .vsync_start = 800 + 2,
3390         .vsync_end = 800 + 2 + 5,
3391         .vtotal = 800 + 2 + 5 + 16,
3392 };
3393
3394 static const struct panel_desc rocktech_rk101ii01d_ct = {
3395         .modes = &rocktech_rk101ii01d_ct_mode,
3396         .num_modes = 1,
3397         .size = {
3398                 .width = 217,
3399                 .height = 136,
3400         },
3401         .delay = {
3402                 .prepare = 50,
3403                 .disable = 50,
3404         },
3405         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
3406         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3407         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3408 };
3409
3410 static const struct drm_display_mode samsung_lsn122dl01_c01_mode = {
3411         .clock = 271560,
3412         .hdisplay = 2560,
3413         .hsync_start = 2560 + 48,
3414         .hsync_end = 2560 + 48 + 32,
3415         .htotal = 2560 + 48 + 32 + 80,
3416         .vdisplay = 1600,
3417         .vsync_start = 1600 + 2,
3418         .vsync_end = 1600 + 2 + 5,
3419         .vtotal = 1600 + 2 + 5 + 57,
3420 };
3421
3422 static const struct panel_desc samsung_lsn122dl01_c01 = {
3423         .modes = &samsung_lsn122dl01_c01_mode,
3424         .num_modes = 1,
3425         .size = {
3426                 .width = 263,
3427                 .height = 164,
3428         },
3429 };
3430
3431 static const struct drm_display_mode samsung_ltn101nt05_mode = {
3432         .clock = 54030,
3433         .hdisplay = 1024,
3434         .hsync_start = 1024 + 24,
3435         .hsync_end = 1024 + 24 + 136,
3436         .htotal = 1024 + 24 + 136 + 160,
3437         .vdisplay = 600,
3438         .vsync_start = 600 + 3,
3439         .vsync_end = 600 + 3 + 6,
3440         .vtotal = 600 + 3 + 6 + 61,
3441 };
3442
3443 static const struct panel_desc samsung_ltn101nt05 = {
3444         .modes = &samsung_ltn101nt05_mode,
3445         .num_modes = 1,
3446         .bpc = 6,
3447         .size = {
3448                 .width = 223,
3449                 .height = 125,
3450         },
3451         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
3452         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
3453         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3454 };
3455
3456 static const struct drm_display_mode samsung_ltn140at29_301_mode = {
3457         .clock = 76300,
3458         .hdisplay = 1366,
3459         .hsync_start = 1366 + 64,
3460         .hsync_end = 1366 + 64 + 48,
3461         .htotal = 1366 + 64 + 48 + 128,
3462         .vdisplay = 768,
3463         .vsync_start = 768 + 2,
3464         .vsync_end = 768 + 2 + 5,
3465         .vtotal = 768 + 2 + 5 + 17,
3466 };
3467
3468 static const struct panel_desc samsung_ltn140at29_301 = {
3469         .modes = &samsung_ltn140at29_301_mode,
3470         .num_modes = 1,
3471         .bpc = 6,
3472         .size = {
3473                 .width = 320,
3474                 .height = 187,
3475         },
3476 };
3477
3478 static const struct display_timing satoz_sat050at40h12r2_timing = {
3479         .pixelclock = {33300000, 33300000, 50000000},
3480         .hactive = {800, 800, 800},
3481         .hfront_porch = {16, 210, 354},
3482         .hback_porch = {46, 46, 46},
3483         .hsync_len = {1, 1, 40},
3484         .vactive = {480, 480, 480},
3485         .vfront_porch = {7, 22, 147},
3486         .vback_porch = {23, 23, 23},
3487         .vsync_len = {1, 1, 20},
3488 };
3489
3490 static const struct panel_desc satoz_sat050at40h12r2 = {
3491         .timings = &satoz_sat050at40h12r2_timing,
3492         .num_timings = 1,
3493         .bpc = 8,
3494         .size = {
3495                 .width = 108,
3496                 .height = 65,
3497         },
3498         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3499         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3500 };
3501
3502 static const struct drm_display_mode sharp_ld_d5116z01b_mode = {
3503         .clock = 168480,
3504         .hdisplay = 1920,
3505         .hsync_start = 1920 + 48,
3506         .hsync_end = 1920 + 48 + 32,
3507         .htotal = 1920 + 48 + 32 + 80,
3508         .vdisplay = 1280,
3509         .vsync_start = 1280 + 3,
3510         .vsync_end = 1280 + 3 + 10,
3511         .vtotal = 1280 + 3 + 10 + 57,
3512         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
3513 };
3514
3515 static const struct panel_desc sharp_ld_d5116z01b = {
3516         .modes = &sharp_ld_d5116z01b_mode,
3517         .num_modes = 1,
3518         .bpc = 8,
3519         .size = {
3520                 .width = 260,
3521                 .height = 120,
3522         },
3523         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3524         .bus_flags = DRM_BUS_FLAG_DATA_MSB_TO_LSB,
3525 };
3526
3527 static const struct drm_display_mode sharp_lq070y3dg3b_mode = {
3528         .clock = 33260,
3529         .hdisplay = 800,
3530         .hsync_start = 800 + 64,
3531         .hsync_end = 800 + 64 + 128,
3532         .htotal = 800 + 64 + 128 + 64,
3533         .vdisplay = 480,
3534         .vsync_start = 480 + 8,
3535         .vsync_end = 480 + 8 + 2,
3536         .vtotal = 480 + 8 + 2 + 35,
3537         .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
3538 };
3539
3540 static const struct panel_desc sharp_lq070y3dg3b = {
3541         .modes = &sharp_lq070y3dg3b_mode,
3542         .num_modes = 1,
3543         .bpc = 8,
3544         .size = {
3545                 .width = 152,   /* 152.4mm */
3546                 .height = 91,   /* 91.4mm */
3547         },
3548         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3549         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE |
3550                      DRM_BUS_FLAG_SYNC_DRIVE_POSEDGE,
3551 };
3552
3553 static const struct drm_display_mode sharp_lq035q7db03_mode = {
3554         .clock = 5500,
3555         .hdisplay = 240,
3556         .hsync_start = 240 + 16,
3557         .hsync_end = 240 + 16 + 7,
3558         .htotal = 240 + 16 + 7 + 5,
3559         .vdisplay = 320,
3560         .vsync_start = 320 + 9,
3561         .vsync_end = 320 + 9 + 1,
3562         .vtotal = 320 + 9 + 1 + 7,
3563 };
3564
3565 static const struct panel_desc sharp_lq035q7db03 = {
3566         .modes = &sharp_lq035q7db03_mode,
3567         .num_modes = 1,
3568         .bpc = 6,
3569         .size = {
3570                 .width = 54,
3571                 .height = 72,
3572         },
3573         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3574 };
3575
3576 static const struct display_timing sharp_lq101k1ly04_timing = {
3577         .pixelclock = { 60000000, 65000000, 80000000 },
3578         .hactive = { 1280, 1280, 1280 },
3579         .hfront_porch = { 20, 20, 20 },
3580         .hback_porch = { 20, 20, 20 },
3581         .hsync_len = { 10, 10, 10 },
3582         .vactive = { 800, 800, 800 },
3583         .vfront_porch = { 4, 4, 4 },
3584         .vback_porch = { 4, 4, 4 },
3585         .vsync_len = { 4, 4, 4 },
3586         .flags = DISPLAY_FLAGS_PIXDATA_POSEDGE,
3587 };
3588
3589 static const struct panel_desc sharp_lq101k1ly04 = {
3590         .timings = &sharp_lq101k1ly04_timing,
3591         .num_timings = 1,
3592         .bpc = 8,
3593         .size = {
3594                 .width = 217,
3595                 .height = 136,
3596         },
3597         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
3598         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3599 };
3600
3601 static const struct display_timing sharp_lq123p1jx31_timing = {
3602         .pixelclock = { 252750000, 252750000, 266604720 },
3603         .hactive = { 2400, 2400, 2400 },
3604         .hfront_porch = { 48, 48, 48 },
3605         .hback_porch = { 80, 80, 84 },
3606         .hsync_len = { 32, 32, 32 },
3607         .vactive = { 1600, 1600, 1600 },
3608         .vfront_porch = { 3, 3, 3 },
3609         .vback_porch = { 33, 33, 120 },
3610         .vsync_len = { 10, 10, 10 },
3611         .flags = DISPLAY_FLAGS_VSYNC_LOW | DISPLAY_FLAGS_HSYNC_LOW,
3612 };
3613
3614 static const struct panel_desc sharp_lq123p1jx31 = {
3615         .timings = &sharp_lq123p1jx31_timing,
3616         .num_timings = 1,
3617         .bpc = 8,
3618         .size = {
3619                 .width = 259,
3620                 .height = 173,
3621         },
3622         .delay = {
3623                 .prepare = 110,
3624                 .enable = 50,
3625                 .unprepare = 550,
3626         },
3627 };
3628
3629 static const struct drm_display_mode sharp_ls020b1dd01d_modes[] = {
3630         { /* 50 Hz */
3631                 .clock = 3000,
3632                 .hdisplay = 240,
3633                 .hsync_start = 240 + 58,
3634                 .hsync_end = 240 + 58 + 1,
3635                 .htotal = 240 + 58 + 1 + 1,
3636                 .vdisplay = 160,
3637                 .vsync_start = 160 + 24,
3638                 .vsync_end = 160 + 24 + 10,
3639                 .vtotal = 160 + 24 + 10 + 6,
3640                 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
3641         },
3642         { /* 60 Hz */
3643                 .clock = 3000,
3644                 .hdisplay = 240,
3645                 .hsync_start = 240 + 8,
3646                 .hsync_end = 240 + 8 + 1,
3647                 .htotal = 240 + 8 + 1 + 1,
3648                 .vdisplay = 160,
3649                 .vsync_start = 160 + 24,
3650                 .vsync_end = 160 + 24 + 10,
3651                 .vtotal = 160 + 24 + 10 + 6,
3652                 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NVSYNC,
3653         },
3654 };
3655
3656 static const struct panel_desc sharp_ls020b1dd01d = {
3657         .modes = sharp_ls020b1dd01d_modes,
3658         .num_modes = ARRAY_SIZE(sharp_ls020b1dd01d_modes),
3659         .bpc = 6,
3660         .size = {
3661                 .width = 42,
3662                 .height = 28,
3663         },
3664         .bus_format = MEDIA_BUS_FMT_RGB565_1X16,
3665         .bus_flags = DRM_BUS_FLAG_DE_HIGH
3666                    | DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE
3667                    | DRM_BUS_FLAG_SHARP_SIGNALS,
3668 };
3669
3670 static const struct drm_display_mode shelly_sca07010_bfn_lnn_mode = {
3671         .clock = 33300,
3672         .hdisplay = 800,
3673         .hsync_start = 800 + 1,
3674         .hsync_end = 800 + 1 + 64,
3675         .htotal = 800 + 1 + 64 + 64,
3676         .vdisplay = 480,
3677         .vsync_start = 480 + 1,
3678         .vsync_end = 480 + 1 + 23,
3679         .vtotal = 480 + 1 + 23 + 22,
3680 };
3681
3682 static const struct panel_desc shelly_sca07010_bfn_lnn = {
3683         .modes = &shelly_sca07010_bfn_lnn_mode,
3684         .num_modes = 1,
3685         .size = {
3686                 .width = 152,
3687                 .height = 91,
3688         },
3689         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3690 };
3691
3692 static const struct drm_display_mode starry_kr070pe2t_mode = {
3693         .clock = 33000,
3694         .hdisplay = 800,
3695         .hsync_start = 800 + 209,
3696         .hsync_end = 800 + 209 + 1,
3697         .htotal = 800 + 209 + 1 + 45,
3698         .vdisplay = 480,
3699         .vsync_start = 480 + 22,
3700         .vsync_end = 480 + 22 + 1,
3701         .vtotal = 480 + 22 + 1 + 22,
3702 };
3703
3704 static const struct panel_desc starry_kr070pe2t = {
3705         .modes = &starry_kr070pe2t_mode,
3706         .num_modes = 1,
3707         .bpc = 8,
3708         .size = {
3709                 .width = 152,
3710                 .height = 86,
3711         },
3712         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3713         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_DRIVE_NEGEDGE,
3714         .connector_type = DRM_MODE_CONNECTOR_DPI,
3715 };
3716
3717 static const struct drm_display_mode starry_kr122ea0sra_mode = {
3718         .clock = 147000,
3719         .hdisplay = 1920,
3720         .hsync_start = 1920 + 16,
3721         .hsync_end = 1920 + 16 + 16,
3722         .htotal = 1920 + 16 + 16 + 32,
3723         .vdisplay = 1200,
3724         .vsync_start = 1200 + 15,
3725         .vsync_end = 1200 + 15 + 2,
3726         .vtotal = 1200 + 15 + 2 + 18,
3727         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3728 };
3729
3730 static const struct panel_desc starry_kr122ea0sra = {
3731         .modes = &starry_kr122ea0sra_mode,
3732         .num_modes = 1,
3733         .size = {
3734                 .width = 263,
3735                 .height = 164,
3736         },
3737         .delay = {
3738                 .prepare = 10 + 200,
3739                 .enable = 50,
3740                 .unprepare = 10 + 500,
3741         },
3742 };
3743
3744 static const struct drm_display_mode tfc_s9700rtwv43tr_01b_mode = {
3745         .clock = 30000,
3746         .hdisplay = 800,
3747         .hsync_start = 800 + 39,
3748         .hsync_end = 800 + 39 + 47,
3749         .htotal = 800 + 39 + 47 + 39,
3750         .vdisplay = 480,
3751         .vsync_start = 480 + 13,
3752         .vsync_end = 480 + 13 + 2,
3753         .vtotal = 480 + 13 + 2 + 29,
3754 };
3755
3756 static const struct panel_desc tfc_s9700rtwv43tr_01b = {
3757         .modes = &tfc_s9700rtwv43tr_01b_mode,
3758         .num_modes = 1,
3759         .bpc = 8,
3760         .size = {
3761                 .width = 155,
3762                 .height = 90,
3763         },
3764         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3765         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
3766 };
3767
3768 static const struct display_timing tianma_tm070jdhg30_timing = {
3769         .pixelclock = { 62600000, 68200000, 78100000 },
3770         .hactive = { 1280, 1280, 1280 },
3771         .hfront_porch = { 15, 64, 159 },
3772         .hback_porch = { 5, 5, 5 },
3773         .hsync_len = { 1, 1, 256 },
3774         .vactive = { 800, 800, 800 },
3775         .vfront_porch = { 3, 40, 99 },
3776         .vback_porch = { 2, 2, 2 },
3777         .vsync_len = { 1, 1, 128 },
3778         .flags = DISPLAY_FLAGS_DE_HIGH,
3779 };
3780
3781 static const struct panel_desc tianma_tm070jdhg30 = {
3782         .timings = &tianma_tm070jdhg30_timing,
3783         .num_timings = 1,
3784         .bpc = 8,
3785         .size = {
3786                 .width = 151,
3787                 .height = 95,
3788         },
3789         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3790         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3791 };
3792
3793 static const struct panel_desc tianma_tm070jvhg33 = {
3794         .timings = &tianma_tm070jdhg30_timing,
3795         .num_timings = 1,
3796         .bpc = 8,
3797         .size = {
3798                 .width = 150,
3799                 .height = 94,
3800         },
3801         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3802         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3803 };
3804
3805 static const struct display_timing tianma_tm070rvhg71_timing = {
3806         .pixelclock = { 27700000, 29200000, 39600000 },
3807         .hactive = { 800, 800, 800 },
3808         .hfront_porch = { 12, 40, 212 },
3809         .hback_porch = { 88, 88, 88 },
3810         .hsync_len = { 1, 1, 40 },
3811         .vactive = { 480, 480, 480 },
3812         .vfront_porch = { 1, 13, 88 },
3813         .vback_porch = { 32, 32, 32 },
3814         .vsync_len = { 1, 1, 3 },
3815         .flags = DISPLAY_FLAGS_DE_HIGH,
3816 };
3817
3818 static const struct panel_desc tianma_tm070rvhg71 = {
3819         .timings = &tianma_tm070rvhg71_timing,
3820         .num_timings = 1,
3821         .bpc = 8,
3822         .size = {
3823                 .width = 154,
3824                 .height = 86,
3825         },
3826         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
3827         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3828 };
3829
3830 static const struct drm_display_mode ti_nspire_cx_lcd_mode[] = {
3831         {
3832                 .clock = 10000,
3833                 .hdisplay = 320,
3834                 .hsync_start = 320 + 50,
3835                 .hsync_end = 320 + 50 + 6,
3836                 .htotal = 320 + 50 + 6 + 38,
3837                 .vdisplay = 240,
3838                 .vsync_start = 240 + 3,
3839                 .vsync_end = 240 + 3 + 1,
3840                 .vtotal = 240 + 3 + 1 + 17,
3841                 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
3842         },
3843 };
3844
3845 static const struct panel_desc ti_nspire_cx_lcd_panel = {
3846         .modes = ti_nspire_cx_lcd_mode,
3847         .num_modes = 1,
3848         .bpc = 8,
3849         .size = {
3850                 .width = 65,
3851                 .height = 49,
3852         },
3853         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
3854         .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_POSEDGE,
3855 };
3856
3857 static const struct drm_display_mode ti_nspire_classic_lcd_mode[] = {
3858         {
3859                 .clock = 10000,
3860                 .hdisplay = 320,
3861                 .hsync_start = 320 + 6,
3862                 .hsync_end = 320 + 6 + 6,
3863                 .htotal = 320 + 6 + 6 + 6,
3864                 .vdisplay = 240,
3865                 .vsync_start = 240 + 0,
3866                 .vsync_end = 240 + 0 + 1,
3867                 .vtotal = 240 + 0 + 1 + 0,
3868                 .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
3869         },
3870 };
3871
3872 static const struct panel_desc ti_nspire_classic_lcd_panel = {
3873         .modes = ti_nspire_classic_lcd_mode,
3874         .num_modes = 1,
3875         /* The grayscale panel has 8 bit for the color .. Y (black) */
3876         .bpc = 8,
3877         .size = {
3878                 .width = 71,
3879                 .height = 53,
3880         },
3881         /* This is the grayscale bus format */
3882         .bus_format = MEDIA_BUS_FMT_Y8_1X8,
3883         .bus_flags = DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
3884 };
3885
3886 static const struct drm_display_mode toshiba_lt089ac29000_mode = {
3887         .clock = 79500,
3888         .hdisplay = 1280,
3889         .hsync_start = 1280 + 192,
3890         .hsync_end = 1280 + 192 + 128,
3891         .htotal = 1280 + 192 + 128 + 64,
3892         .vdisplay = 768,
3893         .vsync_start = 768 + 20,
3894         .vsync_end = 768 + 20 + 7,
3895         .vtotal = 768 + 20 + 7 + 3,
3896 };
3897
3898 static const struct panel_desc toshiba_lt089ac29000 = {
3899         .modes = &toshiba_lt089ac29000_mode,
3900         .num_modes = 1,
3901         .size = {
3902                 .width = 194,
3903                 .height = 116,
3904         },
3905         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA,
3906         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
3907         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3908 };
3909
3910 static const struct drm_display_mode tpk_f07a_0102_mode = {
3911         .clock = 33260,
3912         .hdisplay = 800,
3913         .hsync_start = 800 + 40,
3914         .hsync_end = 800 + 40 + 128,
3915         .htotal = 800 + 40 + 128 + 88,
3916         .vdisplay = 480,
3917         .vsync_start = 480 + 10,
3918         .vsync_end = 480 + 10 + 2,
3919         .vtotal = 480 + 10 + 2 + 33,
3920 };
3921
3922 static const struct panel_desc tpk_f07a_0102 = {
3923         .modes = &tpk_f07a_0102_mode,
3924         .num_modes = 1,
3925         .size = {
3926                 .width = 152,
3927                 .height = 91,
3928         },
3929         .bus_flags = DRM_BUS_FLAG_PIXDATA_DRIVE_POSEDGE,
3930 };
3931
3932 static const struct drm_display_mode tpk_f10a_0102_mode = {
3933         .clock = 45000,
3934         .hdisplay = 1024,
3935         .hsync_start = 1024 + 176,
3936         .hsync_end = 1024 + 176 + 5,
3937         .htotal = 1024 + 176 + 5 + 88,
3938         .vdisplay = 600,
3939         .vsync_start = 600 + 20,
3940         .vsync_end = 600 + 20 + 5,
3941         .vtotal = 600 + 20 + 5 + 25,
3942 };
3943
3944 static const struct panel_desc tpk_f10a_0102 = {
3945         .modes = &tpk_f10a_0102_mode,
3946         .num_modes = 1,
3947         .size = {
3948                 .width = 223,
3949                 .height = 125,
3950         },
3951 };
3952
3953 static const struct display_timing urt_umsh_8596md_timing = {
3954         .pixelclock = { 33260000, 33260000, 33260000 },
3955         .hactive = { 800, 800, 800 },
3956         .hfront_porch = { 41, 41, 41 },
3957         .hback_porch = { 216 - 128, 216 - 128, 216 - 128 },
3958         .hsync_len = { 71, 128, 128 },
3959         .vactive = { 480, 480, 480 },
3960         .vfront_porch = { 10, 10, 10 },
3961         .vback_porch = { 35 - 2, 35 - 2, 35 - 2 },
3962         .vsync_len = { 2, 2, 2 },
3963         .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE |
3964                 DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW,
3965 };
3966
3967 static const struct panel_desc urt_umsh_8596md_lvds = {
3968         .timings = &urt_umsh_8596md_timing,
3969         .num_timings = 1,
3970         .bpc = 6,
3971         .size = {
3972                 .width = 152,
3973                 .height = 91,
3974         },
3975         .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG,
3976         .connector_type = DRM_MODE_CONNECTOR_LVDS,
3977 };
3978
3979 static const struct panel_desc urt_umsh_8596md_parallel = {
3980         .timings = &urt_umsh_8596md_timing,
3981         .num_timings = 1,
3982         .bpc = 6,
3983         .size = {
3984                 .width = 152,
3985                 .height = 91,
3986         },
3987         .bus_format = MEDIA_BUS_FMT_RGB666_1X18,
3988 };
3989
3990 static const struct drm_display_mode vl050_8048nt_c01_mode = {
3991         .clock = 33333,
3992         .hdisplay = 800,
3993         .hsync_start = 800 + 210,
3994         .hsync_end = 800 + 210 + 20,
3995         .htotal = 800 + 210 + 20 + 46,
3996         .vdisplay =  480,
3997         .vsync_start = 480 + 22,
3998         .vsync_end = 480 + 22 + 10,
3999         .vtotal = 480 + 22 + 10 + 23,
4000         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
4001 };
4002
4003 static const struct panel_desc vl050_8048nt_c01 = {
4004         .modes = &vl050_8048nt_c01_mode,
4005         .num_modes = 1,
4006         .bpc = 8,
4007         .size = {
4008                 .width = 120,
4009                 .height = 76,
4010         },
4011         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
4012         .bus_flags = DRM_BUS_FLAG_DE_HIGH | DRM_BUS_FLAG_PIXDATA_SAMPLE_NEGEDGE,
4013 };
4014
4015 static const struct drm_display_mode winstar_wf35ltiacd_mode = {
4016         .clock = 6410,
4017         .hdisplay = 320,
4018         .hsync_start = 320 + 20,
4019         .hsync_end = 320 + 20 + 30,
4020         .htotal = 320 + 20 + 30 + 38,
4021         .vdisplay = 240,
4022         .vsync_start = 240 + 4,
4023         .vsync_end = 240 + 4 + 3,
4024         .vtotal = 240 + 4 + 3 + 15,
4025         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
4026 };
4027
4028 static const struct panel_desc winstar_wf35ltiacd = {
4029         .modes = &winstar_wf35ltiacd_mode,
4030         .num_modes = 1,
4031         .bpc = 8,
4032         .size = {
4033                 .width = 70,
4034                 .height = 53,
4035         },
4036         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
4037 };
4038
4039 static const struct drm_display_mode yes_optoelectronics_ytc700tlag_05_201c_mode = {
4040         .clock = 51200,
4041         .hdisplay = 1024,
4042         .hsync_start = 1024 + 100,
4043         .hsync_end = 1024 + 100 + 100,
4044         .htotal = 1024 + 100 + 100 + 120,
4045         .vdisplay = 600,
4046         .vsync_start = 600 + 10,
4047         .vsync_end = 600 + 10 + 10,
4048         .vtotal = 600 + 10 + 10 + 15,
4049         .flags = DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_PVSYNC,
4050 };
4051
4052 static const struct panel_desc yes_optoelectronics_ytc700tlag_05_201c = {
4053         .modes = &yes_optoelectronics_ytc700tlag_05_201c_mode,
4054         .num_modes = 1,
4055         .bpc = 6,
4056         .size = {
4057                 .width = 154,
4058                 .height = 90,
4059         },
4060         .bus_flags = DRM_BUS_FLAG_DE_HIGH,
4061         .bus_format = MEDIA_BUS_FMT_RGB888_1X7X4_SPWG,
4062         .connector_type = DRM_MODE_CONNECTOR_LVDS,
4063 };
4064
4065 static const struct drm_display_mode arm_rtsm_mode[] = {
4066         {
4067                 .clock = 65000,
4068                 .hdisplay = 1024,
4069                 .hsync_start = 1024 + 24,
4070                 .hsync_end = 1024 + 24 + 136,
4071                 .htotal = 1024 + 24 + 136 + 160,
4072                 .vdisplay = 768,
4073                 .vsync_start = 768 + 3,
4074                 .vsync_end = 768 + 3 + 6,
4075                 .vtotal = 768 + 3 + 6 + 29,
4076                 .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
4077         },
4078 };
4079
4080 static const struct panel_desc arm_rtsm = {
4081         .modes = arm_rtsm_mode,
4082         .num_modes = 1,
4083         .bpc = 8,
4084         .size = {
4085                 .width = 400,
4086                 .height = 300,
4087         },
4088         .bus_format = MEDIA_BUS_FMT_RGB888_1X24,
4089 };
4090
4091 static const struct of_device_id platform_of_match[] = {
4092         {
4093                 .compatible = "ampire,am-1280800n3tzqw-t00h",
4094                 .data = &ampire_am_1280800n3tzqw_t00h,
4095         }, {
4096                 .compatible = "ampire,am-480272h3tmqw-t01h",
4097                 .data = &ampire_am_480272h3tmqw_t01h,
4098         }, {
4099                 .compatible = "ampire,am800480r3tmqwa1h",
4100                 .data = &ampire_am800480r3tmqwa1h,
4101         }, {
4102                 .compatible = "arm,rtsm-display",
4103                 .data = &arm_rtsm,
4104         }, {
4105                 .compatible = "armadeus,st0700-adapt",
4106                 .data = &armadeus_st0700_adapt,
4107         }, {
4108                 .compatible = "auo,b101aw03",
4109                 .data = &auo_b101aw03,
4110         }, {
4111                 .compatible = "auo,b101ean01",
4112                 .data = &auo_b101ean01,
4113         }, {
4114                 .compatible = "auo,b101xtn01",
4115                 .data = &auo_b101xtn01,
4116         }, {
4117                 .compatible = "auo,b116xa01",
4118                 .data = &auo_b116xak01,
4119         }, {
4120                 .compatible = "auo,b116xw03",
4121                 .data = &auo_b116xw03,
4122         }, {
4123                 .compatible = "auo,b133htn01",
4124                 .data = &auo_b133htn01,
4125         }, {
4126                 .compatible = "auo,b133xtn01",
4127                 .data = &auo_b133xtn01,
4128         }, {
4129                 .compatible = "auo,g070vvn01",
4130                 .data = &auo_g070vvn01,
4131         }, {
4132                 .compatible = "auo,g101evn010",
4133                 .data = &auo_g101evn010,
4134         }, {
4135                 .compatible = "auo,g104sn02",
4136                 .data = &auo_g104sn02,
4137         }, {
4138                 .compatible = "auo,g121ean01",
4139                 .data = &auo_g121ean01,
4140         }, {
4141                 .compatible = "auo,g133han01",
4142                 .data = &auo_g133han01,
4143         }, {
4144                 .compatible = "auo,g156xtn01",
4145                 .data = &auo_g156xtn01,
4146         }, {
4147                 .compatible = "auo,g185han01",
4148                 .data = &auo_g185han01,
4149         }, {
4150                 .compatible = "auo,g190ean01",
4151                 .data = &auo_g190ean01,
4152         }, {
4153                 .compatible = "auo,p320hvn03",
4154                 .data = &auo_p320hvn03,
4155         }, {
4156                 .compatible = "auo,t215hvn01",
4157                 .data = &auo_t215hvn01,
4158         }, {
4159                 .compatible = "avic,tm070ddh03",
4160                 .data = &avic_tm070ddh03,
4161         }, {
4162                 .compatible = "bananapi,s070wv20-ct16",
4163                 .data = &bananapi_s070wv20_ct16,
4164         }, {
4165                 .compatible = "boe,hv070wsa-100",
4166                 .data = &boe_hv070wsa
4167         }, {
4168                 .compatible = "boe,nv101wxmn51",
4169                 .data = &boe_nv101wxmn51,
4170         }, {
4171                 .compatible = "boe,nv110wtm-n61",
4172                 .data = &boe_nv110wtm_n61,
4173         }, {
4174                 .compatible = "boe,nv133fhm-n61",
4175                 .data = &boe_nv133fhm_n61,
4176         }, {
4177                 .compatible = "boe,nv133fhm-n62",
4178                 .data = &boe_nv133fhm_n61,
4179         }, {
4180                 .compatible = "boe,nv140fhmn49",
4181                 .data = &boe_nv140fhmn49,
4182         }, {
4183                 .compatible = "cdtech,s043wq26h-ct7",
4184                 .data = &cdtech_s043wq26h_ct7,
4185         }, {
4186                 .compatible = "cdtech,s070pws19hp-fc21",
4187                 .data = &cdtech_s070pws19hp_fc21,
4188         }, {
4189                 .compatible = "cdtech,s070swv29hg-dc44",
4190                 .data = &cdtech_s070swv29hg_dc44,
4191         }, {
4192                 .compatible = "cdtech,s070wv95-ct16",
4193                 .data = &cdtech_s070wv95_ct16,
4194         }, {
4195                 .compatible = "chefree,ch101olhlwh-002",
4196                 .data = &chefree_ch101olhlwh_002,
4197         }, {
4198                 .compatible = "chunghwa,claa070wp03xg",
4199                 .data = &chunghwa_claa070wp03xg,
4200         }, {
4201                 .compatible = "chunghwa,claa101wa01a",
4202                 .data = &chunghwa_claa101wa01a
4203         }, {
4204                 .compatible = "chunghwa,claa101wb01",
4205                 .data = &chunghwa_claa101wb01
4206         }, {
4207                 .compatible = "dataimage,scf0700c48ggu18",
4208                 .data = &dataimage_scf0700c48ggu18,
4209         }, {
4210                 .compatible = "dlc,dlc0700yzg-1",
4211                 .data = &dlc_dlc0700yzg_1,
4212         }, {
4213                 .compatible = "dlc,dlc1010gig",
4214                 .data = &dlc_dlc1010gig,
4215         }, {
4216                 .compatible = "edt,et035012dm6",
4217                 .data = &edt_et035012dm6,
4218         }, {
4219                 .compatible = "edt,etm043080dh6gp",
4220                 .data = &edt_etm043080dh6gp,
4221         }, {
4222                 .compatible = "edt,etm0430g0dh6",
4223                 .data = &edt_etm0430g0dh6,
4224         }, {
4225                 .compatible = "edt,et057090dhu",
4226                 .data = &edt_et057090dhu,
4227         }, {
4228                 .compatible = "edt,et070080dh6",
4229                 .data = &edt_etm0700g0dh6,
4230         }, {
4231                 .compatible = "edt,etm0700g0dh6",
4232                 .data = &edt_etm0700g0dh6,
4233         }, {
4234                 .compatible = "edt,etm0700g0bdh6",
4235                 .data = &edt_etm0700g0bdh6,
4236         }, {
4237                 .compatible = "edt,etm0700g0edh6",
4238                 .data = &edt_etm0700g0bdh6,
4239         }, {
4240                 .compatible = "evervision,vgg804821",
4241                 .data = &evervision_vgg804821,
4242         }, {
4243                 .compatible = "foxlink,fl500wvr00-a0t",
4244                 .data = &foxlink_fl500wvr00_a0t,
4245         }, {
4246                 .compatible = "frida,frd350h54004",
4247                 .data = &frida_frd350h54004,
4248         }, {
4249                 .compatible = "friendlyarm,hd702e",
4250                 .data = &friendlyarm_hd702e,
4251         }, {
4252                 .compatible = "giantplus,gpg482739qs5",
4253                 .data = &giantplus_gpg482739qs5
4254         }, {
4255                 .compatible = "giantplus,gpm940b0",
4256                 .data = &giantplus_gpm940b0,
4257         }, {
4258                 .compatible = "hannstar,hsd070pww1",
4259                 .data = &hannstar_hsd070pww1,
4260         }, {
4261                 .compatible = "hannstar,hsd100pxn1",
4262                 .data = &hannstar_hsd100pxn1,
4263         }, {
4264                 .compatible = "hit,tx23d38vm0caa",
4265                 .data = &hitachi_tx23d38vm0caa
4266         }, {
4267                 .compatible = "innolux,at043tn24",
4268                 .data = &innolux_at043tn24,
4269         }, {
4270                 .compatible = "innolux,at070tn92",
4271                 .data = &innolux_at070tn92,
4272         }, {
4273                 .compatible = "innolux,g070y2-l01",
4274                 .data = &innolux_g070y2_l01,
4275         }, {
4276                 .compatible = "innolux,g101ice-l01",
4277                 .data = &innolux_g101ice_l01
4278         }, {
4279                 .compatible = "innolux,g121i1-l01",
4280                 .data = &innolux_g121i1_l01
4281         }, {
4282                 .compatible = "innolux,g121x1-l03",
4283                 .data = &innolux_g121x1_l03,
4284         }, {
4285                 .compatible = "innolux,n116bge",
4286                 .data = &innolux_n116bge,
4287         }, {
4288                 .compatible = "innolux,n125hce-gn1",
4289                 .data = &innolux_n125hce_gn1,
4290         }, {
4291                 .compatible = "innolux,n156bge-l21",
4292                 .data = &innolux_n156bge_l21,
4293         }, {
4294                 .compatible = "innolux,p120zdg-bf1",
4295                 .data = &innolux_p120zdg_bf1,
4296         }, {
4297                 .compatible = "innolux,zj070na-01p",
4298                 .data = &innolux_zj070na_01p,
4299         }, {
4300                 .compatible = "ivo,m133nwf4-r0",
4301                 .data = &ivo_m133nwf4_r0,
4302         }, {
4303                 .compatible = "kingdisplay,kd116n21-30nv-a010",
4304                 .data = &kingdisplay_kd116n21_30nv_a010,
4305         }, {
4306                 .compatible = "koe,tx14d24vm1bpa",
4307                 .data = &koe_tx14d24vm1bpa,
4308         }, {
4309                 .compatible = "koe,tx26d202vm0bwa",
4310                 .data = &koe_tx26d202vm0bwa,
4311         }, {
4312                 .compatible = "koe,tx31d200vm0baa",
4313                 .data = &koe_tx31d200vm0baa,
4314         }, {
4315                 .compatible = "kyo,tcg121xglp",
4316                 .data = &kyo_tcg121xglp,
4317         }, {
4318                 .compatible = "lemaker,bl035-rgb-002",
4319                 .data = &lemaker_bl035_rgb_002,
4320         }, {
4321                 .compatible = "lg,lb070wv8",
4322                 .data = &lg_lb070wv8,
4323         }, {
4324                 .compatible = "lg,lp079qx1-sp0v",
4325                 .data = &lg_lp079qx1_sp0v,
4326         }, {
4327                 .compatible = "lg,lp097qx1-spa1",
4328                 .data = &lg_lp097qx1_spa1,
4329         }, {
4330                 .compatible = "lg,lp120up1",
4331                 .data = &lg_lp120up1,
4332         }, {
4333                 .compatible = "lg,lp129qe",
4334                 .data = &lg_lp129qe,
4335         }, {
4336                 .compatible = "logicpd,type28",
4337                 .data = &logicpd_type_28,
4338         }, {
4339                 .compatible = "logictechno,lt161010-2nhc",
4340                 .data = &logictechno_lt161010_2nh,
4341         }, {
4342                 .compatible = "logictechno,lt161010-2nhr",
4343                 .data = &logictechno_lt161010_2nh,
4344         }, {
4345                 .compatible = "logictechno,lt170410-2whc",
4346                 .data = &logictechno_lt170410_2whc,
4347         }, {
4348                 .compatible = "mitsubishi,aa070mc01-ca1",
4349                 .data = &mitsubishi_aa070mc01,
4350         }, {
4351                 .compatible = "nec,nl12880bc20-05",
4352                 .data = &nec_nl12880bc20_05,
4353         }, {
4354                 .compatible = "nec,nl4827hc19-05b",
4355                 .data = &nec_nl4827hc19_05b,
4356         }, {
4357                 .compatible = "netron-dy,e231732",
4358                 .data = &netron_dy_e231732,
4359         }, {
4360                 .compatible = "neweast,wjfh116008a",
4361                 .data = &neweast_wjfh116008a,
4362         }, {
4363                 .compatible = "newhaven,nhd-4.3-480272ef-atxl",
4364                 .data = &newhaven_nhd_43_480272ef_atxl,
4365         }, {
4366                 .compatible = "nlt,nl192108ac18-02d",
4367                 .data = &nlt_nl192108ac18_02d,
4368         }, {
4369                 .compatible = "nvd,9128",
4370                 .data = &nvd_9128,
4371         }, {
4372                 .compatible = "okaya,rs800480t-7x0gp",
4373                 .data = &okaya_rs800480t_7x0gp,
4374         }, {
4375                 .compatible = "olimex,lcd-olinuxino-43-ts",
4376                 .data = &olimex_lcd_olinuxino_43ts,
4377         }, {
4378                 .compatible = "ontat,yx700wv03",
4379                 .data = &ontat_yx700wv03,
4380         }, {
4381                 .compatible = "ortustech,com37h3m05dtc",
4382                 .data = &ortustech_com37h3m,
4383         }, {
4384                 .compatible = "ortustech,com37h3m99dtc",
4385                 .data = &ortustech_com37h3m,
4386         }, {
4387                 .compatible = "ortustech,com43h4m85ulc",
4388                 .data = &ortustech_com43h4m85ulc,
4389         }, {
4390                 .compatible = "osddisplays,osd070t1718-19ts",
4391                 .data = &osddisplays_osd070t1718_19ts,
4392         }, {
4393                 .compatible = "pda,91-00156-a0",
4394                 .data = &pda_91_00156_a0,
4395         }, {
4396                 .compatible = "powertip,ph800480t013-idf02",
4397                 .data = &powertip_ph800480t013_idf02,
4398         }, {
4399                 .compatible = "qiaodian,qd43003c0-40",
4400                 .data = &qd43003c0_40,
4401         }, {
4402                 .compatible = "rocktech,rk070er9427",
4403                 .data = &rocktech_rk070er9427,
4404         }, {
4405                 .compatible = "rocktech,rk101ii01d-ct",
4406                 .data = &rocktech_rk101ii01d_ct,
4407         }, {
4408                 .compatible = "samsung,lsn122dl01-c01",
4409                 .data = &samsung_lsn122dl01_c01,
4410         }, {
4411                 .compatible = "samsung,ltn101nt05",
4412                 .data = &samsung_ltn101nt05,
4413         }, {
4414                 .compatible = "samsung,ltn140at29-301",
4415                 .data = &samsung_ltn140at29_301,
4416         }, {
4417                 .compatible = "satoz,sat050at40h12r2",
4418                 .data = &satoz_sat050at40h12r2,
4419         }, {
4420                 .compatible = "sharp,ld-d5116z01b",
4421                 .data = &sharp_ld_d5116z01b,
4422         }, {
4423                 .compatible = "sharp,lq035q7db03",
4424                 .data = &sharp_lq035q7db03,
4425         }, {
4426                 .compatible = "sharp,lq070y3dg3b",
4427                 .data = &sharp_lq070y3dg3b,
4428         }, {
4429                 .compatible = "sharp,lq101k1ly04",
4430                 .data = &sharp_lq101k1ly04,
4431         }, {
4432                 .compatible = "sharp,lq123p1jx31",
4433                 .data = &sharp_lq123p1jx31,
4434         }, {
4435                 .compatible = "sharp,ls020b1dd01d",
4436                 .data = &sharp_ls020b1dd01d,
4437         }, {
4438                 .compatible = "shelly,sca07010-bfn-lnn",
4439                 .data = &shelly_sca07010_bfn_lnn,
4440         }, {
4441                 .compatible = "starry,kr070pe2t",
4442                 .data = &starry_kr070pe2t,
4443         }, {
4444                 .compatible = "starry,kr122ea0sra",
4445                 .data = &starry_kr122ea0sra,
4446         }, {
4447                 .compatible = "tfc,s9700rtwv43tr-01b",
4448                 .data = &tfc_s9700rtwv43tr_01b,
4449         }, {
4450                 .compatible = "tianma,tm070jdhg30",
4451                 .data = &tianma_tm070jdhg30,
4452         }, {
4453                 .compatible = "tianma,tm070jvhg33",
4454                 .data = &tianma_tm070jvhg33,
4455         }, {
4456                 .compatible = "tianma,tm070rvhg71",
4457                 .data = &tianma_tm070rvhg71,
4458         }, {
4459                 .compatible = "ti,nspire-cx-lcd-panel",
4460                 .data = &ti_nspire_cx_lcd_panel,
4461         }, {
4462                 .compatible = "ti,nspire-classic-lcd-panel",
4463                 .data = &ti_nspire_classic_lcd_panel,
4464         }, {
4465                 .compatible = "toshiba,lt089ac29000",
4466                 .data = &toshiba_lt089ac29000,
4467         }, {
4468                 .compatible = "tpk,f07a-0102",
4469                 .data = &tpk_f07a_0102,
4470         }, {
4471                 .compatible = "tpk,f10a-0102",
4472                 .data = &tpk_f10a_0102,
4473         }, {
4474                 .compatible = "urt,umsh-8596md-t",
4475                 .data = &urt_umsh_8596md_parallel,
4476         }, {
4477                 .compatible = "urt,umsh-8596md-1t",
4478                 .data = &urt_umsh_8596md_parallel,
4479         }, {
4480                 .compatible = "urt,umsh-8596md-7t",
4481                 .data = &urt_umsh_8596md_parallel,
4482         }, {
4483                 .compatible = "urt,umsh-8596md-11t",
4484                 .data = &urt_umsh_8596md_lvds,
4485         }, {
4486                 .compatible = "urt,umsh-8596md-19t",
4487                 .data = &urt_umsh_8596md_lvds,
4488         }, {
4489                 .compatible = "urt,umsh-8596md-20t",
4490                 .data = &urt_umsh_8596md_parallel,
4491         }, {
4492                 .compatible = "vxt,vl050-8048nt-c01",
4493                 .data = &vl050_8048nt_c01,
4494         }, {
4495                 .compatible = "winstar,wf35ltiacd",
4496                 .data = &winstar_wf35ltiacd,
4497         }, {
4498                 .compatible = "yes-optoelectronics,ytc700tlag-05-201c",
4499                 .data = &yes_optoelectronics_ytc700tlag_05_201c,
4500         }, {
4501                 /* Must be the last entry */
4502                 .compatible = "panel-dpi",
4503                 .data = &panel_dpi,
4504         }, {
4505                 /* sentinel */
4506         }
4507 };
4508 MODULE_DEVICE_TABLE(of, platform_of_match);
4509
4510 static int panel_simple_platform_probe(struct platform_device *pdev)
4511 {
4512         const struct of_device_id *id;
4513
4514         id = of_match_node(platform_of_match, pdev->dev.of_node);
4515         if (!id)
4516                 return -ENODEV;
4517
4518         return panel_simple_probe(&pdev->dev, id->data);
4519 }
4520
4521 static int panel_simple_platform_remove(struct platform_device *pdev)
4522 {
4523         return panel_simple_remove(&pdev->dev);
4524 }
4525
4526 static void panel_simple_platform_shutdown(struct platform_device *pdev)
4527 {
4528         panel_simple_shutdown(&pdev->dev);
4529 }
4530
4531 static struct platform_driver panel_simple_platform_driver = {
4532         .driver = {
4533                 .name = "panel-simple",
4534                 .of_match_table = platform_of_match,
4535         },
4536         .probe = panel_simple_platform_probe,
4537         .remove = panel_simple_platform_remove,
4538         .shutdown = panel_simple_platform_shutdown,
4539 };
4540
4541 struct panel_desc_dsi {
4542         struct panel_desc desc;
4543
4544         unsigned long flags;
4545         enum mipi_dsi_pixel_format format;
4546         unsigned int lanes;
4547 };
4548
4549 static const struct drm_display_mode auo_b080uan01_mode = {
4550         .clock = 154500,
4551         .hdisplay = 1200,
4552         .hsync_start = 1200 + 62,
4553         .hsync_end = 1200 + 62 + 4,
4554         .htotal = 1200 + 62 + 4 + 62,
4555         .vdisplay = 1920,
4556         .vsync_start = 1920 + 9,
4557         .vsync_end = 1920 + 9 + 2,
4558         .vtotal = 1920 + 9 + 2 + 8,
4559 };
4560
4561 static const struct panel_desc_dsi auo_b080uan01 = {
4562         .desc = {
4563                 .modes = &auo_b080uan01_mode,
4564                 .num_modes = 1,
4565                 .bpc = 8,
4566                 .size = {
4567                         .width = 108,
4568                         .height = 272,
4569                 },
4570                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4571         },
4572         .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
4573         .format = MIPI_DSI_FMT_RGB888,
4574         .lanes = 4,
4575 };
4576
4577 static const struct drm_display_mode boe_tv080wum_nl0_mode = {
4578         .clock = 160000,
4579         .hdisplay = 1200,
4580         .hsync_start = 1200 + 120,
4581         .hsync_end = 1200 + 120 + 20,
4582         .htotal = 1200 + 120 + 20 + 21,
4583         .vdisplay = 1920,
4584         .vsync_start = 1920 + 21,
4585         .vsync_end = 1920 + 21 + 3,
4586         .vtotal = 1920 + 21 + 3 + 18,
4587         .flags = DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_NHSYNC,
4588 };
4589
4590 static const struct panel_desc_dsi boe_tv080wum_nl0 = {
4591         .desc = {
4592                 .modes = &boe_tv080wum_nl0_mode,
4593                 .num_modes = 1,
4594                 .size = {
4595                         .width = 107,
4596                         .height = 172,
4597                 },
4598                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4599         },
4600         .flags = MIPI_DSI_MODE_VIDEO |
4601                  MIPI_DSI_MODE_VIDEO_BURST |
4602                  MIPI_DSI_MODE_VIDEO_SYNC_PULSE,
4603         .format = MIPI_DSI_FMT_RGB888,
4604         .lanes = 4,
4605 };
4606
4607 static const struct drm_display_mode lg_ld070wx3_sl01_mode = {
4608         .clock = 71000,
4609         .hdisplay = 800,
4610         .hsync_start = 800 + 32,
4611         .hsync_end = 800 + 32 + 1,
4612         .htotal = 800 + 32 + 1 + 57,
4613         .vdisplay = 1280,
4614         .vsync_start = 1280 + 28,
4615         .vsync_end = 1280 + 28 + 1,
4616         .vtotal = 1280 + 28 + 1 + 14,
4617 };
4618
4619 static const struct panel_desc_dsi lg_ld070wx3_sl01 = {
4620         .desc = {
4621                 .modes = &lg_ld070wx3_sl01_mode,
4622                 .num_modes = 1,
4623                 .bpc = 8,
4624                 .size = {
4625                         .width = 94,
4626                         .height = 151,
4627                 },
4628                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4629         },
4630         .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_CLOCK_NON_CONTINUOUS,
4631         .format = MIPI_DSI_FMT_RGB888,
4632         .lanes = 4,
4633 };
4634
4635 static const struct drm_display_mode lg_lh500wx1_sd03_mode = {
4636         .clock = 67000,
4637         .hdisplay = 720,
4638         .hsync_start = 720 + 12,
4639         .hsync_end = 720 + 12 + 4,
4640         .htotal = 720 + 12 + 4 + 112,
4641         .vdisplay = 1280,
4642         .vsync_start = 1280 + 8,
4643         .vsync_end = 1280 + 8 + 4,
4644         .vtotal = 1280 + 8 + 4 + 12,
4645 };
4646
4647 static const struct panel_desc_dsi lg_lh500wx1_sd03 = {
4648         .desc = {
4649                 .modes = &lg_lh500wx1_sd03_mode,
4650                 .num_modes = 1,
4651                 .bpc = 8,
4652                 .size = {
4653                         .width = 62,
4654                         .height = 110,
4655                 },
4656                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4657         },
4658         .flags = MIPI_DSI_MODE_VIDEO,
4659         .format = MIPI_DSI_FMT_RGB888,
4660         .lanes = 4,
4661 };
4662
4663 static const struct drm_display_mode panasonic_vvx10f004b00_mode = {
4664         .clock = 157200,
4665         .hdisplay = 1920,
4666         .hsync_start = 1920 + 154,
4667         .hsync_end = 1920 + 154 + 16,
4668         .htotal = 1920 + 154 + 16 + 32,
4669         .vdisplay = 1200,
4670         .vsync_start = 1200 + 17,
4671         .vsync_end = 1200 + 17 + 2,
4672         .vtotal = 1200 + 17 + 2 + 16,
4673 };
4674
4675 static const struct panel_desc_dsi panasonic_vvx10f004b00 = {
4676         .desc = {
4677                 .modes = &panasonic_vvx10f004b00_mode,
4678                 .num_modes = 1,
4679                 .bpc = 8,
4680                 .size = {
4681                         .width = 217,
4682                         .height = 136,
4683                 },
4684                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4685         },
4686         .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
4687                  MIPI_DSI_CLOCK_NON_CONTINUOUS,
4688         .format = MIPI_DSI_FMT_RGB888,
4689         .lanes = 4,
4690 };
4691
4692 static const struct drm_display_mode lg_acx467akm_7_mode = {
4693         .clock = 150000,
4694         .hdisplay = 1080,
4695         .hsync_start = 1080 + 2,
4696         .hsync_end = 1080 + 2 + 2,
4697         .htotal = 1080 + 2 + 2 + 2,
4698         .vdisplay = 1920,
4699         .vsync_start = 1920 + 2,
4700         .vsync_end = 1920 + 2 + 2,
4701         .vtotal = 1920 + 2 + 2 + 2,
4702 };
4703
4704 static const struct panel_desc_dsi lg_acx467akm_7 = {
4705         .desc = {
4706                 .modes = &lg_acx467akm_7_mode,
4707                 .num_modes = 1,
4708                 .bpc = 8,
4709                 .size = {
4710                         .width = 62,
4711                         .height = 110,
4712                 },
4713                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4714         },
4715         .flags = 0,
4716         .format = MIPI_DSI_FMT_RGB888,
4717         .lanes = 4,
4718 };
4719
4720 static const struct drm_display_mode osd101t2045_53ts_mode = {
4721         .clock = 154500,
4722         .hdisplay = 1920,
4723         .hsync_start = 1920 + 112,
4724         .hsync_end = 1920 + 112 + 16,
4725         .htotal = 1920 + 112 + 16 + 32,
4726         .vdisplay = 1200,
4727         .vsync_start = 1200 + 16,
4728         .vsync_end = 1200 + 16 + 2,
4729         .vtotal = 1200 + 16 + 2 + 16,
4730         .flags = DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC,
4731 };
4732
4733 static const struct panel_desc_dsi osd101t2045_53ts = {
4734         .desc = {
4735                 .modes = &osd101t2045_53ts_mode,
4736                 .num_modes = 1,
4737                 .bpc = 8,
4738                 .size = {
4739                         .width = 217,
4740                         .height = 136,
4741                 },
4742                 .connector_type = DRM_MODE_CONNECTOR_DSI,
4743         },
4744         .flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
4745                  MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
4746                  MIPI_DSI_MODE_EOT_PACKET,
4747         .format = MIPI_DSI_FMT_RGB888,
4748         .lanes = 4,
4749 };
4750
4751 static const struct of_device_id dsi_of_match[] = {
4752         {
4753                 .compatible = "auo,b080uan01",
4754                 .data = &auo_b080uan01
4755         }, {
4756                 .compatible = "boe,tv080wum-nl0",
4757                 .data = &boe_tv080wum_nl0
4758         }, {
4759                 .compatible = "lg,ld070wx3-sl01",
4760                 .data = &lg_ld070wx3_sl01
4761         }, {
4762                 .compatible = "lg,lh500wx1-sd03",
4763                 .data = &lg_lh500wx1_sd03
4764         }, {
4765                 .compatible = "panasonic,vvx10f004b00",
4766                 .data = &panasonic_vvx10f004b00
4767         }, {
4768                 .compatible = "lg,acx467akm-7",
4769                 .data = &lg_acx467akm_7
4770         }, {
4771                 .compatible = "osddisplays,osd101t2045-53ts",
4772                 .data = &osd101t2045_53ts
4773         }, {
4774                 /* sentinel */
4775         }
4776 };
4777 MODULE_DEVICE_TABLE(of, dsi_of_match);
4778
4779 static int panel_simple_dsi_probe(struct mipi_dsi_device *dsi)
4780 {
4781         const struct panel_desc_dsi *desc;
4782         const struct of_device_id *id;
4783         int err;
4784
4785         id = of_match_node(dsi_of_match, dsi->dev.of_node);
4786         if (!id)
4787                 return -ENODEV;
4788
4789         desc = id->data;
4790
4791         err = panel_simple_probe(&dsi->dev, &desc->desc);
4792         if (err < 0)
4793                 return err;
4794
4795         dsi->mode_flags = desc->flags;
4796         dsi->format = desc->format;
4797         dsi->lanes = desc->lanes;
4798
4799         err = mipi_dsi_attach(dsi);
4800         if (err) {
4801                 struct panel_simple *panel = dev_get_drvdata(&dsi->dev);
4802
4803                 drm_panel_remove(&panel->base);
4804         }
4805
4806         return err;
4807 }
4808
4809 static int panel_simple_dsi_remove(struct mipi_dsi_device *dsi)
4810 {
4811         int err;
4812
4813         err = mipi_dsi_detach(dsi);
4814         if (err < 0)
4815                 dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
4816
4817         return panel_simple_remove(&dsi->dev);
4818 }
4819
4820 static void panel_simple_dsi_shutdown(struct mipi_dsi_device *dsi)
4821 {
4822         panel_simple_shutdown(&dsi->dev);
4823 }
4824
4825 static struct mipi_dsi_driver panel_simple_dsi_driver = {
4826         .driver = {
4827                 .name = "panel-simple-dsi",
4828                 .of_match_table = dsi_of_match,
4829         },
4830         .probe = panel_simple_dsi_probe,
4831         .remove = panel_simple_dsi_remove,
4832         .shutdown = panel_simple_dsi_shutdown,
4833 };
4834
4835 static int __init panel_simple_init(void)
4836 {
4837         int err;
4838
4839         err = platform_driver_register(&panel_simple_platform_driver);
4840         if (err < 0)
4841                 return err;
4842
4843         if (IS_ENABLED(CONFIG_DRM_MIPI_DSI)) {
4844                 err = mipi_dsi_driver_register(&panel_simple_dsi_driver);
4845                 if (err < 0) {
4846                         platform_driver_unregister(&panel_simple_platform_driver);
4847                         return err;
4848                 }
4849         }
4850
4851         return 0;
4852 }
4853 module_init(panel_simple_init);
4854
4855 static void __exit panel_simple_exit(void)
4856 {
4857         if (IS_ENABLED(CONFIG_DRM_MIPI_DSI))
4858                 mipi_dsi_driver_unregister(&panel_simple_dsi_driver);
4859
4860         platform_driver_unregister(&panel_simple_platform_driver);
4861 }
4862 module_exit(panel_simple_exit);
4863
4864 MODULE_AUTHOR("Thierry Reding <[email protected]>");
4865 MODULE_DESCRIPTION("DRM Driver for Simple Panels");
4866 MODULE_LICENSE("GPL and additional rights");
This page took 0.340255 seconds and 4 git commands to generate.