Skip to content
Navigation Menu
Toggle navigation
Sign in
In this repository
All GitHub Enterprise
↵
Jump to
↵
No suggested jump to results
In this repository
All GitHub Enterprise
↵
Jump to
↵
In this organization
All GitHub Enterprise
↵
Jump to
↵
In this repository
All GitHub Enterprise
↵
Jump to
↵
Sign in
Reseting focus
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
mariux64
/
linux
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Issues
1
Pull requests
0
Actions
Projects
0
Wiki
Security
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security
Insights
Files
b1d7e4b
Documentation
arch
block
crypto
drivers
accessibility
acpi
amba
ata
atm
auxdisplay
base
bcma
block
bluetooth
cdrom
char
clk
clocksource
connector
cpufreq
cpuidle
crypto
dca
devfreq
dio
dma
edac
eisa
firewire
firmware
gpio
gpu
drm
exynos
gma500
i2c
i810
i915
Makefile
dvo.h
dvo_ch7017.c
dvo_ch7xxx.c
dvo_ivch.c
dvo_sil164.c
dvo_tfp410.c
i915_debugfs.c
i915_dma.c
i915_drv.c
i915_drv.h
i915_gem.c
i915_gem_debug.c
i915_gem_evict.c
i915_gem_execbuffer.c
i915_gem_gtt.c
i915_gem_tiling.c
i915_ioc32.c
i915_irq.c
i915_reg.h
i915_suspend.c
i915_trace.h
i915_trace_points.c
intel_acpi.c
intel_bios.c
intel_bios.h
intel_crt.c
intel_display.c
intel_dp.c
intel_drv.h
intel_dvo.c
intel_fb.c
intel_hdmi.c
intel_i2c.c
intel_lvds.c
intel_modes.c
intel_opregion.c
intel_overlay.c
intel_panel.c
intel_ringbuffer.c
intel_ringbuffer.h
intel_sdvo.c
intel_sdvo_regs.h
intel_sprite.c
intel_tv.c
mga
nouveau
r128
radeon
savage
sis
tdfx
ttm
via
vmwgfx
Kconfig
Makefile
README.drm
ati_pcigart.c
drm_agpsupport.c
drm_auth.c
drm_buffer.c
drm_bufs.c
drm_cache.c
drm_context.c
drm_crtc.c
drm_crtc_helper.c
drm_debugfs.c
drm_dma.c
drm_dp_i2c_helper.c
drm_drv.c
drm_edid.c
drm_edid_modes.h
drm_encoder_slave.c
drm_fb_helper.c
drm_fops.c
drm_gem.c
drm_global.c
drm_hashtab.c
drm_info.c
drm_ioc32.c
drm_ioctl.c
drm_irq.c
drm_lock.c
drm_memory.c
drm_mm.c
drm_modes.c
drm_pci.c
drm_platform.c
drm_proc.c
drm_scatter.c
drm_stub.c
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_usb.c
drm_vm.c
stub
vga
Makefile
hid
hv
hwmon
hwspinlock
i2c
ide
idle
ieee802154
infiniband
input
iommu
isdn
leds
lguest
macintosh
mca
md
media
memstick
message
mfd
misc
mmc
mtd
net
nfc
nubus
of
oprofile
parisc
parport
pci
pcmcia
pinctrl
platform
pnp
power
pps
ps3
ptp
rapidio
regulator
rtc
s390
sbus
scsi
sfi
sh
sn
spi
ssb
staging
target
tc
telephony
thermal
tty
uio
usb
uwb
vhost
video
virt
virtio
vlynq
w1
watchdog
xen
zorro
Kconfig
Makefile
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS
Makefile
README
REPORTING-BUGS
Breadcrumbs
linux
/
drivers
/
gpu
/
drm
/
i915
/
intel_modes.c
Copy path
Blame
Blame
Latest commit
History
History
146 lines (129 loc) · 3.84 KB
Breadcrumbs
linux
/
drivers
/
gpu
/
drm
/
i915
/
intel_modes.c
Top
File metadata and controls
Code
Blame
146 lines (129 loc) · 3.84 KB
Raw
/* * Copyright (c) 2007 Dave Airlie <airlied@linux.ie> * Copyright (c) 2007, 2010 Intel Corporation * Jesse Barnes <jesse.barnes@intel.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. */ #include <linux/slab.h> #include <linux/i2c.h> #include <linux/fb.h> #include <drm/drm_edid.h> #include "drmP.h" #include "intel_drv.h" #include "i915_drv.h" /** * intel_ddc_probe * */ bool intel_ddc_probe(struct intel_encoder *intel_encoder, int ddc_bus) { struct drm_i915_private *dev_priv = intel_encoder->base.dev->dev_private; u8 out_buf[] = { 0x0, 0x0}; u8 buf[2]; struct i2c_msg msgs[] = { { .addr = 0x50, .flags = 0, .len = 1, .buf = out_buf, }, { .addr = 0x50, .flags = I2C_M_RD, .len = 1, .buf = buf, } }; return i2c_transfer(&dev_priv->gmbus[ddc_bus].adapter, msgs, 2) == 2; } /** * intel_ddc_get_modes - get modelist from monitor * @connector: DRM connector device to use * @adapter: i2c adapter * * Fetch the EDID information from @connector using the DDC bus. */ int intel_ddc_get_modes(struct drm_connector *connector, struct i2c_adapter *adapter) { struct edid *edid; int ret = 0; edid = drm_get_edid(connector, adapter); if (edid) { drm_mode_connector_update_edid_property(connector, edid); ret = drm_add_edid_modes(connector, edid); drm_edid_to_eld(connector, edid); connector->display_info.raw_edid = NULL; kfree(edid); } return ret; } static const char *force_audio_names[] = { "force-dvi", "off", "auto", "on", }; void intel_attach_force_audio_property(struct drm_connector *connector) { struct drm_device *dev = connector->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct drm_property *prop; int i; prop = dev_priv->force_audio_property; if (prop == NULL) { prop = drm_property_create(dev, DRM_MODE_PROP_ENUM, "audio", ARRAY_SIZE(force_audio_names)); if (prop == NULL) return; for (i = 0; i < ARRAY_SIZE(force_audio_names); i++) drm_property_add_enum(prop, i, i-2, force_audio_names[i]); dev_priv->force_audio_property = prop; } drm_connector_attach_property(connector, prop, 0); } static const char *broadcast_rgb_names[] = { "Full", "Limited 16:235", }; void intel_attach_broadcast_rgb_property(struct drm_connector *connector) { struct drm_device *dev = connector->dev; struct drm_i915_private *dev_priv = dev->dev_private; struct drm_property *prop; int i; prop = dev_priv->broadcast_rgb_property; if (prop == NULL) { prop = drm_property_create(dev, DRM_MODE_PROP_ENUM, "Broadcast RGB", ARRAY_SIZE(broadcast_rgb_names)); if (prop == NULL) return; for (i = 0; i < ARRAY_SIZE(broadcast_rgb_names); i++) drm_property_add_enum(prop, i, i, broadcast_rgb_names[i]); dev_priv->broadcast_rgb_property = prop; } drm_connector_attach_property(connector, prop, 0); }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
You can’t perform that action at this time.