summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* drm: exynos: hdmi: add support for exynos5 ddcRahul Sharma2012-10-051-5/+17
| | | | | | | | This patch adds support for exynos5 ddc with device tree enabled. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm: exynos: remove drm hdmi platform data structRahul Sharma2012-10-051-13/+0
| | | | | | | | | | This patch removes the drm hdmi platform data structure which is no longer in use by drm hdmi driver after this patch set get merged. s5p hdmi platform data structure is used instead. Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm: exynos: hdmi: turn off HPD interrupt in HDMI chipTomasz Stanislawski2012-10-051-4/+1
| | | | | | | | | The plug/unplug interrupt are handled by a separate interrupt. So there is no need to replicate this mechanism in HDMI core. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm: exynos: hdmi: use s5p-hdmi platform dataTomasz Stanislawski2012-10-051-31/+24
| | | | | | | | | | | | The 'exynos-drm-hdmi' driver makes use of s5p-tv platform devices. Therefore the driver should use the same platform data to prevent crashes caused by dereferencing incorrect types. This patch corrects the exynos-drm-hdmi driver to the platform data from s5p-hdmi. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm: exynos: hdmi: fix interrupt handlingTomasz Stanislawski2012-10-051-2/+3
| | | | | | | | | This patch fixes 'unsigned < 0' check in probe. Moreover it releases an interrupt at remove. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm: exynos: hdmi: support for platform variantsTomasz Stanislawski2012-10-051-1/+24
| | | | | | | | | This patch implements check if HDMI is version 1.3 by using a driver variant instead of platform data. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* media: s5p-hdmi: add HPD GPIO to platform dataTomasz Stanislawski2012-10-051-0/+2
| | | | | | | | | | This patch extends s5p-hdmi platform data by a GPIO identifier for Hot-Plug-Detection pin. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Acked-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm/exynos: fix kcalloc size of g2d cmdlist nodeJoonyoung Shim2012-10-041-2/+1
| | | | | | | | | The size argument means just one element size when we call kcalloc, so G2D_CMDLIST_NUM * sizeof(*node) is wrong. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm/exynos: fix to calculate CRTC shown via screenJoonyoung Shim2012-10-041-2/+54
| | | | | | | | | | This patch is to exactly calculate CRTC shown via screen for all cases. Refer exynos_plane_get_size() function for this. Also source position of fb is fixed when start position of CRTC is negative number. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
* drm/exynos: fix display power call issue.Inki Dae2012-10-043-4/+5
| | | | | | | | | | | | | | | | | | | | | | Changelog v3: make exynos_drm_display_power function use exynos_drm_best_encoder function instead of connector->encoder to get a valid encoder. connector->encoder could be NULL because with DRM_IOCTL_MODE_RMFB request, connector->encoder is NULL so fix this issue. Changelog v2: remove static prefix so that exynos_drm_best_encoder function could be called by other modules. Changelog v1: this patch fixes the issue that display power callback isn't called. with DRM_IOCTL_MODE_RMFB request, encoder->connector becomes NULL so display_ops->power_on() wouldn't be called so this patch makes exynos_drm_best_encoder function to be used to get a valid encoder of each connector. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: add platform_device_id table and driver data for drm fimdLeela Krishna Amudala2012-10-041-4/+39
| | | | | | | | | | Two device ids are created for exynos4-fb and exynos5-fb. Also, added driver data for exynos4 and exynos5 to pick the timing base address at runtime to write data into appropriate register address. Signed-off-by: Leela Krishna Amudala <l.krishna@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: Fix potential NULL pointer dereferenceSachin Kamat2012-10-041-1/+5
| | | | | | | | | | drm_mode_create() returns NULL if it fails to create a new display mode. Check the value returned to avoid NULL pointer deferencing later. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: support drm_wait_vblank feature for VIDIInki Dae2012-10-042-1/+31
| | | | | | | | | | this patch adds drm_wait_vblank support to Virtual Display module so user can use DRM_IOCT_WAIT_VBLANK ioctl with this patch. for this, you should set _DRM_VBLANK_EXYNOS_VIDI flags to vblwait->request.type Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: check crtc's dpms mode at SetCrtcInki Dae2012-10-041-0/+6
| | | | | | | | | | | | when fb changing is requested, crtc's dpms mode should be on. if not on, return -EPERM so that the hardware can't be accessed. if user requesed dpms off and next SetCrtc with an another fb then the hardware can be accessed with dpms off to write overlay data onto some registers so this patch will prevent from accessing the hardware with dpms off. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: check crtc's dpms mode at page flipInki Dae2012-10-041-0/+6
| | | | | | | | when page flip is requested, crtc's dpms mode should be on. if not on, return -EINVAL so that it doesn't access hardware. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: fix duplicated mutex lock issueInki Dae2012-10-041-5/+0
| | | | | | | | | | exynos_drm_crtc_dpms function doesn't need mutex lock because mutex lock was called by drm framework so this patch removes mutex lock call from that function to avoid duplicated mutex locking. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: add pid to g2d_runqueue_nodeInki Dae2012-10-041-0/+2
| | | | | | | | this patch adds pid to g2d_runqueue_node as member to identify which process owns this node. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: Disable plane when releasedInki Dae2012-10-041-0/+15
| | | | | | | | | | | | | | | | this patch ensures that each plane connected to encoder is disabled when released, by adding disable callback function of encoder helper we had faced with one issue that invalid memory is accessed by dma once drm is released and then the dma is turned on again. actually, in our case, page fault was incurred with iommu. the reason is that a gem buffer accessed by the dma is also released once drm is released. so this patch would fix this issue ensuring the dma is disabled when released. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: update crtc to plane safelyInki Dae2012-10-041-3/+56
| | | | | | | | | | if old_crtc isn't same as encoder->crtc then it means that user changed crtc id to another one so a plane to old_crtc should be disabled so that current plane can be updated safely and plane->crtc should be set to new crtc(encoder->crtc) Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: check NV12M format specific to Exynos properlyInki Dae2012-10-044-17/+73
| | | | | | | | | | | | | this patch adds buf_cnt variable in exynos_drm_fb structure and that means a buffer count to drm framebuffer and also adds two functions to get/set the buffer count from/to exynos_drm_fb structure. if pixel format is not DRM_FORMAT_NV12MT then it gets a buffer count to drm framebuffer refering to mode_cmd->handles and offsets. but when booted, the buffer count will always be 1 because pixel format of console framebuffer is RGB format. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: make sure that hardware overlay for hdmi is disabledInki Dae2012-10-043-0/+25
| | | | | | | | | | the values set to registers will be updated into real registers at vsync so dma operation could be malfunctioned when accessed to memory after gem buffer was released. this patch makes sure that hw overlay is disabled before the gem buffer is released. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: make sure that hardware overlay for fimd is disabledInki Dae2012-10-041-0/+12
| | | | | | | | | | | | | | Changelog v2: wait for VSYNC instead of BACKPORCH. Changelog v1: the values set to registers will be updated into real registers at vsync so dma operation could be malfunctioned when accessed to memory after gem buffer was released. this patch makes sure that hw overlay is disabled before the gem buffer is released. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: add wait_for_vblank callback interface.Inki Dae2012-10-042-0/+27
| | | | | | | | | | | | Changelog v2: fixed comments. Changelog v1: this interface can be used to make sure that hardware overlay is disabled to avoid that memory region is accessed by dma after gem buffer was released. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: fixed duplicated mode setting.Inki Dae2012-10-044-14/+62
| | | | | | | | | | | | this patch fixes that when drm_crtc_helper_set_mode() is called, mode data for hardware overlay and conntroller are updated two times. for example, in case that drm_crtc_helper_set_mode() is called, overlay_ops->commit() and manager_ops->commit() callbacks can be called two times, first at drm_crtc_helper_set_mode() and second at drm_helper_connector_dpms(). Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: separeated fimd_power_on into some parts.Inki Dae2012-10-041-20/+40
| | | | | | | | | | | | | Changelog v2: fix pm operation when resume. Changelog v1: this patch separetes fimd_power_on into fimd_activate and fimd_clock and fimd_activate function will call fimd_clock to control fimd power and vsync interrupt. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: separated subdrv_probe function into two parts.Inki Dae2012-10-041-31/+69
| | | | | | | | | | | | | | | Changelog v2: fixed the issue that when sub driver is probed, no kms drivers such as fimd or hdmi are failed. no kms drivers have no manager so if manager is null then encoder and connector creation should be ignored. Changelog v1: this patch separates exynos_drm_subdrv_probe function into sub driver's probe call and encoder/connector creation so that exynos drm core module can take exception when some operation was failed properly. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* drm/exynos: added device object to subdrv's remove callback as argumentInki Dae2012-10-044-4/+4
| | | | | | | | | when remove callback of exynos_drm_subdrv is called, it could need device object for sub driver to control things specific to hw such as runtime pm. Signed-off-by: Inki Dae <inki.dae@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
* Merge branch 'drm-nouveau-next' of ↵Dave Airlie2012-10-03469-38085/+54203
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://anongit.freedesktop.org/git/nouveau/linux-2.6 into drm-next This is a major rework of the nouveau driver core, to reflect more closely how the hw is used and to make it easier to implement newer features now that the GPUs are more clearly understood than when nouveau started. It also contains a few other bits: thermal patches nv41/44 pcie gart fixes i2c unregistering fixes. * 'drm-nouveau-next' of git://anongit.freedesktop.org/git/nouveau/linux-2.6: (191 commits) drm/nv98/crypt: fix fuc build with latest envyas drm/nouveau/devinit: fixup various issues with subdev ctor/init ordering drm/nv41/vm: fix and enable use of "real" pciegart drm/nv44/vm: fix and enable use of "real" pciegart drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcie drm/nouveau: store supported dma mask in vmmgr drm/nvc0/ibus: initial implementation of subdev drm/nouveau/therm: add support for fan-control modes drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rules drm/nouveau/therm: calculate the pwm divisor on nv50+ drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, faster drm/nouveau/therm: move thermal-related functions to the therm subdev drm/nouveau/bios: parse the pwm divisor from the perf table drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devices drm/nouveau/therm: rework thermal table parsing drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios table drm/nouveau: fix pm initialization order drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it drm/nouveau: log channel debug/error messages from client object rather than drm client drm/nouveau: have drm debugging macros build on top of core macros ... Conflicts: drivers/gpu/drm/nouveau/nouveau_dp.c
| * drm/nv98/crypt: fix fuc build with latest envyasBen Skeggs2012-10-031-1/+1
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/devinit: fixup various issues with subdev ctor/init orderingBen Skeggs2012-10-032-16/+38
| | | | | | | | | | | | | | Details of the problem, and solution, are in comments in the commit proper. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv41/vm: fix and enable use of "real" pciegartBen Skeggs2012-10-032-7/+14
| | | | | | | | | | | | | | | | | | | | Hopefully fixed the tlb flush timeout issue. Was able to observe this condition occur occasionally, and it appears the binary driver doesn't wait on the old condition either.. Should give 39-bit DMA addressing on the relevant chipsets. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv44/vm: fix and enable use of "real" pciegartBen Skeggs2012-10-034-41/+29
| | | | | | | | | | | | | | | | | | | | | | | | Something seems to be missing in regards to flushing specific ranges of the TLB. For the moment, flushing the entire thing seems to make it work alright. Should give 39-bit DMA addressing on the relevant chipsets. v2: allocate contig 16KiB for dummy pages, reported by mwk on irc Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nv04/dmaobj: fixup vm target handling in preparation for nv4x pcieBen Skeggs2012-10-031-7/+10
| | | | | | | | | | | | | | We don't need to pull the page address out of the page tables on nv4x chips that have a real GART. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: store supported dma mask in vmmgrBen Skeggs2012-10-037-7/+9
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0/ibus: initial implementation of subdevBen Skeggs2012-10-034-0/+134
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: add support for fan-control modesMartin Peres2012-10-036-5/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For now, only 2 control modes are available: - NONE: The fan is never touched (default) - MANUAL: The fan is set to the user-defined fan speed (pwm1) This patch introduces a distinction between ptherm internal fan management and external fan management. The latter is bound to respect the fan mode while the first can still select the speed it wants unless the NONE mode is selected. This is important for automatic fan management. Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/hwmon: rename pwm0* to pmw1* to follow hwmon's rulesMartin Peres2012-10-031-18/+18
| | | | | | | | | | | | | | | | This was reported by tizbac on IRC. Signed-off-by: Martin Peres <martin.peres@labri.fr> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: calculate the pwm divisor on nv50+Martin Peres2012-10-033-4/+37
| | | | | | | | | | | | | | | | v2: Martin Peres <martin.peres@labri.fr> - fixed unintentional use of floating point Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/fan: rewrite the fan tachometer driver to get more precision, fasterMartin Peres2012-10-031-9/+16
| | | | | | | | | | | | | | | | | | | | | | | | The previous driver waited for 250ms to accumulate data. This version times a complete fan rotation and extrapolates to RPM. The fan rotational speed should now be read in less than 250ms (worst case) and usually in less 50ms. Signed-off-by: Martin Peres <martin.peres@labri.fr> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: move thermal-related functions to the therm subdevMartin Peres2012-10-0322-542/+1048
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It looks scary because of the size, but I tried to keep the differences minimal. Further patches will fix the actual "driver" code and add new features. v2: change filenames, split to submodules v3: add a missing include v4: Ben Skeggs <bskeggs@redhat.com> - fixed set_defaults() to allow min_duty < 30 (thermal table will override this if it's actually necessary) - fixed set_defaults() to not provide pwm_freq so nv4x (which only has pwm_div) can actually work. the boards using pwm_freq will have a thermal table entry to provide us the value. - removed unused files Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: parse the pwm divisor from the perf tableMartin Peres2012-10-033-0/+90
| | | | | | | | | | | | | | v2: perf_table now is more in line with the other functions Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: use the EXTDEV table to detect i2c monitoring devicesMartin Peres2012-10-034-0/+174
| | | | | | | | | | | | | | | | | | | | This commit also adds a static list of all known devices and their possible i2c addresses. v2: use the common table parsing technique as suggested by darktama Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/therm: rework thermal table parsingMartin Peres2012-10-036-205/+282
| | | | | | | | | | | | | | | | | | As an accident, it should also fix temperature reading on nv4x. v2: introduce nvbios_therm_entry as advised by darktama Signed-off-by: Martin Peres <martin.peres@labri.fr> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/gpio: expose the PWM/TOGGLE parameter found in the gpio vbios tableMartin Peres2012-10-032-0/+10
| | | | | | | | | | | | Signed-off-by: Martin Peres <martin.peres@labri.fr> Reviewed-by: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: fix pm initialization orderDmitry Eremin-Solenikov2012-10-031-1/+2
| | | | | | | | | | | | | | | | | | | | If nouveau_pm_perflvl_get() fails, pm->profiles list will be left uninitialized, which causes oops during nouveau_pm_fini(). Move INIT_LIST_HEAD before call to nouveau_pm_perflvl_get(). Signed-off-by: Dmitry Eremin-Solenikov <dmitry_eremin@mentor.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/bios: check that fixed tvdac gpio data is valid before using itBen Skeggs2012-10-031-7/+11
| | | | | | | | Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: log channel debug/error messages from client object rather than ↵Ben Skeggs2012-10-031-5/+5
| | | | | | | | | | | | | | | | drm client This will make it more obvious which application caused particular messages. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau: have drm debugging macros build on top of core macrosBen Skeggs2012-10-031-13/+6
| | | | | | | | | | | | May kill the DRM version completely at some point, undecided.. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nouveau/core: have client-id be a string, rather than an integerBen Skeggs2012-10-034-10/+14
| | | | | | | | | | | | Can be somewhat more informative that way... Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
| * drm/nvc0/fifo: re-bash PBUS regs after vm-fault to BARs/PEEPHOLEBen Skeggs2012-10-031-4/+18
| | | | | | | | | | | | Seems to be required to "re-arm" the engines after a vm fault. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
OpenPOWER on IntegriCloud