Lines Matching refs:odev

289 	void __iomem *(*cmap_ioremap)(struct ofdrm_device *odev,
292 void (*cmap_write)(struct ofdrm_device *odev, unsigned char index,
354 static int ofdrm_device_init_pci(struct ofdrm_device *odev) in ofdrm_device_init_pci() argument
356 struct drm_device *dev = &odev->sysfb.dev; in ofdrm_device_init_pci()
386 static int ofdrm_device_init_pci(struct ofdrm_device *odev) in ofdrm_device_init_pci() argument
396 static struct resource *ofdrm_find_fb_resource(struct ofdrm_device *odev, in ofdrm_find_fb_resource() argument
399 struct platform_device *pdev = to_platform_device(odev->sysfb.dev.dev); in ofdrm_find_fb_resource()
422 static void __iomem *get_cmap_address_of(struct ofdrm_device *odev, struct device_node *of_node, in get_cmap_address_of() argument
425 struct drm_device *dev = &odev->sysfb.dev; in get_cmap_address_of()
454 static void __iomem *ofdrm_mach64_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_mach64_cmap_ioremap() argument
458 struct drm_device *dev = &odev->sysfb.dev; in ofdrm_mach64_cmap_ioremap()
472 static void ofdrm_mach64_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_mach64_cmap_write() argument
475 void __iomem *addr = odev->cmap_base + 0xcc0; in ofdrm_mach64_cmap_write()
476 void __iomem *data = odev->cmap_base + 0xcc0 + 1; in ofdrm_mach64_cmap_write()
484 static void __iomem *ofdrm_rage128_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_rage128_cmap_ioremap() argument
488 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff); in ofdrm_rage128_cmap_ioremap()
491 static void ofdrm_rage128_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_rage128_cmap_write() argument
494 void __iomem *addr = odev->cmap_base + 0xb0; in ofdrm_rage128_cmap_write()
495 void __iomem *data = odev->cmap_base + 0xb4; in ofdrm_rage128_cmap_write()
502 static void __iomem *ofdrm_rage_m3a_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_rage_m3a_cmap_ioremap() argument
506 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff); in ofdrm_rage_m3a_cmap_ioremap()
509 static void ofdrm_rage_m3a_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_rage_m3a_cmap_write() argument
512 void __iomem *dac_ctl = odev->cmap_base + 0x58; in ofdrm_rage_m3a_cmap_write()
513 void __iomem *addr = odev->cmap_base + 0xb0; in ofdrm_rage_m3a_cmap_write()
514 void __iomem *data = odev->cmap_base + 0xb4; in ofdrm_rage_m3a_cmap_write()
528 static void __iomem *ofdrm_rage_m3b_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_rage_m3b_cmap_ioremap() argument
532 return get_cmap_address_of(odev, of_node, 2, 0, 0x1fff); in ofdrm_rage_m3b_cmap_ioremap()
535 static void ofdrm_rage_m3b_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_rage_m3b_cmap_write() argument
538 void __iomem *dac_ctl = odev->cmap_base + 0x58; in ofdrm_rage_m3b_cmap_write()
539 void __iomem *addr = odev->cmap_base + 0xb0; in ofdrm_rage_m3b_cmap_write()
540 void __iomem *data = odev->cmap_base + 0xb4; in ofdrm_rage_m3b_cmap_write()
554 static void __iomem *ofdrm_radeon_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_radeon_cmap_ioremap() argument
558 return get_cmap_address_of(odev, of_node, 1, 0, 0x1fff); in ofdrm_radeon_cmap_ioremap()
561 static void __iomem *ofdrm_gxt2000_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_gxt2000_cmap_ioremap() argument
565 return get_cmap_address_of(odev, of_node, 0, 0x6000, 0x1000); in ofdrm_gxt2000_cmap_ioremap()
568 static void ofdrm_gxt2000_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_gxt2000_cmap_write() argument
571 void __iomem *data = ((unsigned int __iomem *)odev->cmap_base) + index; in ofdrm_gxt2000_cmap_write()
577 static void __iomem *ofdrm_avivo_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_avivo_cmap_ioremap() argument
585 cmap_base = get_cmap_address_of(odev, of_parent, 0, 0, 0x10000); in ofdrm_avivo_cmap_ioremap()
591 static void ofdrm_avivo_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_avivo_cmap_write() argument
594 void __iomem *lutsel = odev->cmap_base + AVIVO_DC_LUT_RW_SELECT; in ofdrm_avivo_cmap_write()
595 void __iomem *addr = odev->cmap_base + AVIVO_DC_LUT_RW_INDEX; in ofdrm_avivo_cmap_write()
596 void __iomem *data = odev->cmap_base + AVIVO_DC_LUT_30_COLOR; in ofdrm_avivo_cmap_write()
610 static void __iomem *ofdrm_qemu_cmap_ioremap(struct ofdrm_device *odev, in ofdrm_qemu_cmap_ioremap() argument
620 struct drm_device *dev = &odev->sysfb.dev; in ofdrm_qemu_cmap_ioremap()
635 static void ofdrm_qemu_cmap_write(struct ofdrm_device *odev, unsigned char index, in ofdrm_qemu_cmap_write() argument
638 void __iomem *addr = odev->cmap_base; in ofdrm_qemu_cmap_write()
639 void __iomem *data = odev->cmap_base + 1; in ofdrm_qemu_cmap_write()
651 struct ofdrm_device *odev = ofdrm_device_of_dev(dev); in ofdrm_set_gamma_lut() local
660 odev->funcs->cmap_write(odev, i8, r8, g8, b8); in ofdrm_set_gamma_lut()
663 static void ofdrm_device_fill_gamma(struct ofdrm_device *odev, in ofdrm_device_fill_gamma() argument
666 struct drm_device *dev = &odev->sysfb.dev; in ofdrm_device_fill_gamma()
667 struct drm_crtc *crtc = &odev->crtc; in ofdrm_device_fill_gamma()
685 static void ofdrm_device_load_gamma(struct ofdrm_device *odev, in ofdrm_device_load_gamma() argument
689 struct drm_device *dev = &odev->sysfb.dev; in ofdrm_device_load_gamma()
690 struct drm_crtc *crtc = &odev->crtc; in ofdrm_device_load_gamma()
727 struct ofdrm_device *odev = ofdrm_device_of_dev(crtc->dev); in ofdrm_crtc_helper_atomic_flush() local
735 ofdrm_device_load_gamma(odev, format, crtc_state->gamma_lut->data); in ofdrm_crtc_helper_atomic_flush()
737 ofdrm_device_fill_gamma(odev, format); in ofdrm_crtc_helper_atomic_flush()
819 struct ofdrm_device *odev; in ofdrm_device_create() local
839 odev = devm_drm_dev_alloc(&pdev->dev, drv, struct ofdrm_device, sysfb.dev); in ofdrm_device_create()
840 if (IS_ERR(odev)) in ofdrm_device_create()
841 return ERR_CAST(odev); in ofdrm_device_create()
842 sysfb = &odev->sysfb; in ofdrm_device_create()
846 ret = ofdrm_device_init_pci(odev); in ofdrm_device_create()
859 odev->funcs = &ofdrm_unknown_device_funcs; in ofdrm_device_create()
862 odev->funcs = &ofdrm_mach64_device_funcs; in ofdrm_device_create()
865 odev->funcs = &ofdrm_rage128_device_funcs; in ofdrm_device_create()
868 odev->funcs = &ofdrm_rage_m3a_device_funcs; in ofdrm_device_create()
871 odev->funcs = &ofdrm_rage_m3b_device_funcs; in ofdrm_device_create()
874 odev->funcs = &ofdrm_radeon_device_funcs; in ofdrm_device_create()
877 odev->funcs = &ofdrm_gxt2000_device_funcs; in ofdrm_device_create()
880 odev->funcs = &ofdrm_avivo_device_funcs; in ofdrm_device_create()
883 odev->funcs = &ofdrm_qemu_device_funcs; in ofdrm_device_create()
927 res = ofdrm_find_fb_resource(odev, &fb_res); in ofdrm_device_create()
937 res = ofdrm_find_fb_resource(odev, &fb_res); in ofdrm_device_create()
966 if (odev->funcs->cmap_ioremap) { in ofdrm_device_create()
967 void __iomem *cmap_base = odev->funcs->cmap_ioremap(odev, of_node, fb_base); in ofdrm_device_create()
973 odev->cmap_base = cmap_base; in ofdrm_device_create()
978 edid = display_get_edid_of(dev, of_node, odev->edid); in ofdrm_device_create()
988 if (odev->cmap_base) in ofdrm_device_create()
1018 odev->formats, ARRAY_SIZE(odev->formats)); in ofdrm_device_create()
1020 primary_plane = &odev->primary_plane; in ofdrm_device_create()
1022 odev->formats, nformats, in ofdrm_device_create()
1032 crtc = &odev->crtc; in ofdrm_device_create()
1047 encoder = &odev->encoder; in ofdrm_device_create()
1055 connector = &odev->connector; in ofdrm_device_create()
1073 return odev; in ofdrm_device_create()
1099 struct ofdrm_device *odev; in ofdrm_probe() local
1104 odev = ofdrm_device_create(&ofdrm_driver, pdev); in ofdrm_probe()
1105 if (IS_ERR(odev)) in ofdrm_probe()
1106 return PTR_ERR(odev); in ofdrm_probe()
1107 sysfb = &odev->sysfb; in ofdrm_probe()