Rev 6937 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6937 | Rev 7144 | ||
---|---|---|---|
Line 551... | Line 551... | ||
551 | * What I have done is to translate it by using integer calculation. |
551 | * What I have done is to translate it by using integer calculation. |
552 | * I also refer to the function of fb_get_mode in the file of |
552 | * I also refer to the function of fb_get_mode in the file of |
553 | * drivers/video/fbmon.c |
553 | * drivers/video/fbmon.c |
554 | * |
554 | * |
555 | * Standard GTF parameters: |
555 | * Standard GTF parameters: |
556 | * M = 600 |
556 | * M = 600 |
557 | * C = 40 |
557 | * C = 40 |
558 | * K = 128 |
558 | * K = 128 |
559 | * J = 20 |
559 | * J = 20 |
560 | * |
560 | * |
561 | * Returns: |
561 | * Returns: |
562 | * The modeline based on the GTF algorithm stored in a drm_display_mode object. |
562 | * The modeline based on the GTF algorithm stored in a drm_display_mode object. |
563 | * The display mode object is allocated with drm_mode_create(). Returns NULL |
563 | * The display mode object is allocated with drm_mode_create(). Returns NULL |
564 | * when no mode could be allocated. |
564 | * when no mode could be allocated. |
Line 1214... | Line 1214... | ||
1214 | } else if ((mode->type & DRM_MODE_TYPE_PREFERRED) == 0 && |
1214 | } else if ((mode->type & DRM_MODE_TYPE_PREFERRED) == 0 && |
1215 | (pmode->type & DRM_MODE_TYPE_PREFERRED) != 0) { |
1215 | (pmode->type & DRM_MODE_TYPE_PREFERRED) != 0) { |
1216 | pmode->type |= mode->type; |
1216 | pmode->type |= mode->type; |
1217 | drm_mode_copy(mode, pmode); |
1217 | drm_mode_copy(mode, pmode); |
1218 | } else { |
1218 | } else { |
1219 | mode->type |= pmode->type; |
1219 | mode->type |= pmode->type; |
1220 | } |
1220 | } |
Line 1221... | Line 1221... | ||
1221 | 1221 | ||
1222 | list_del(&pmode->head); |
1222 | list_del(&pmode->head); |
1223 | drm_mode_destroy(connector->dev, pmode); |
1223 | drm_mode_destroy(connector->dev, pmode); |
1224 | break; |
1224 | break; |
Line 1225... | Line 1225... | ||
1225 | } |
1225 | } |
1226 | 1226 | ||
1227 | if (!found_it) { |
1227 | if (!found_it) { |
1228 | list_move_tail(&pmode->head, &connector->modes); |
1228 | list_move_tail(&pmode->head, &connector->modes); |
Line 1242... | Line 1242... | ||
1242 | * modeline in fb_mode_option will be parsed instead. |
1242 | * modeline in fb_mode_option will be parsed instead. |
1243 | * |
1243 | * |
1244 | * This uses the same parameters as the fb modedb.c, except for an extra |
1244 | * This uses the same parameters as the fb modedb.c, except for an extra |
1245 | * force-enable, force-enable-digital and force-disable bit at the end: |
1245 | * force-enable, force-enable-digital and force-disable bit at the end: |
1246 | * |
1246 | * |
1247 | * |
1247 | * |
1248 | * |
1248 | * |
1249 | * The intermediate drm_cmdline_mode structure is required to store additional |
1249 | * The intermediate drm_cmdline_mode structure is required to store additional |
1250 | * options from the command line modline like the force-enable/disable flag. |
1250 | * options from the command line modline like the force-enable/disable flag. |
1251 | * |
1251 | * |
1252 | * Returns: |
1252 | * Returns: |
Line 1369... | Line 1369... | ||
1369 | /* catch mode that begins with digits but has no 'x' */ |
1369 | /* catch mode that begins with digits but has no 'x' */ |
1370 | i = 0; |
1370 | i = 0; |
1371 | } |
1371 | } |
1372 | done: |
1372 | done: |
1373 | if (i >= 0) { |
1373 | if (i >= 0) { |
1374 | printk(KERN_WARNING |
- | |
1375 | "parse error at position %i in video mode '%s'\n", |
1374 | pr_warn("[drm] parse error at position %i in video mode '%s'\n", |
1376 | i, name); |
1375 | i, name); |
1377 | mode->specified = false; |
1376 | mode->specified = false; |
1378 | return false; |
1377 | return false; |
1379 | } |
1378 | } |
Line 1517... | Line 1516... | ||
1517 | 1516 | ||
1518 | out->status = drm_mode_validate_basic(out); |
1517 | out->status = drm_mode_validate_basic(out); |
1519 | if (out->status != MODE_OK) |
1518 | if (out->status != MODE_OK) |
Line -... | Line 1519... | ||
- | 1519 | goto out; |
|
- | 1520 | ||
1520 | goto out; |
1521 | drm_mode_set_crtcinfo(out, CRTC_INTERLACE_HALVE_V); |
Line 1521... | Line 1522... | ||
1521 | 1522 | ||
1522 | ret = 0; |
1523 | ret = 0; |
1523 | 1524 |