Skip to content

Commit

Permalink
Merge tag 'exynos-drm-fixes-for-v4.16-rc3' of git://git.kernel.org/pu…
Browse files Browse the repository at this point in the history
…b/scm/linux/kernel/git/daeinki/drm-exynos into drm-fixes

- three fixeups
  . it fixes potential issues[1] by using monotonic timestamp
    instead of 'struct timeval'
  . correct HDMI_I2S_PIN_SEL_1 definition and setting value.
  . fix bit shift typo of FIMC register definition
- two cleanups
  . remove unnecessary error messages
  . remove exynos_drm_rotator.h file

[1] https://patchwork.kernel.org/patch/10170205/

* tag 'exynos-drm-fixes-for-v4.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos:
  drm: exynos: Use proper macro definition for HDMI_I2S_PIN_SEL_1
  drm/exynos: remove exynos_drm_rotator.h
  drm/exynos: g2d: Delete an error message for a failed memory allocation in two functions
  drm/exynos: fix comparison to bitshift when dealing with a mask
  drm/exynos: g2d: use monotonic timestamps
  • Loading branch information
Dave Airlie committed Feb 20, 2018
2 parents 91ab883 + c84b66f commit d73e011
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 30 deletions.
12 changes: 5 additions & 7 deletions drivers/gpu/drm/exynos/exynos_drm_g2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,6 @@ static int g2d_init_cmdlist(struct g2d_data *g2d)

node = kcalloc(G2D_CMDLIST_NUM, sizeof(*node), GFP_KERNEL);
if (!node) {
dev_err(dev, "failed to allocate memory\n");
ret = -ENOMEM;
goto err;
}
Expand Down Expand Up @@ -926,17 +925,17 @@ static void g2d_finish_event(struct g2d_data *g2d, u32 cmdlist_no)
struct drm_device *drm_dev = g2d->subdrv.drm_dev;
struct g2d_runqueue_node *runqueue_node = g2d->runqueue_node;
struct drm_exynos_pending_g2d_event *e;
struct timeval now;
struct timespec64 now;

if (list_empty(&runqueue_node->event_list))
return;

e = list_first_entry(&runqueue_node->event_list,
struct drm_exynos_pending_g2d_event, base.link);

do_gettimeofday(&now);
ktime_get_ts64(&now);
e->event.tv_sec = now.tv_sec;
e->event.tv_usec = now.tv_usec;
e->event.tv_usec = now.tv_nsec / NSEC_PER_USEC;
e->event.cmdlist_no = cmdlist_no;

drm_send_event(drm_dev, &e->base);
Expand Down Expand Up @@ -1358,10 +1357,9 @@ int exynos_g2d_exec_ioctl(struct drm_device *drm_dev, void *data,
return -EFAULT;

runqueue_node = kmem_cache_alloc(g2d->runqueue_slab, GFP_KERNEL);
if (!runqueue_node) {
dev_err(dev, "failed to allocate memory\n");
if (!runqueue_node)
return -ENOMEM;
}

run_cmdlist = &runqueue_node->run_cmdlist;
event_list = &runqueue_node->event_list;
INIT_LIST_HEAD(run_cmdlist);
Expand Down
19 changes: 0 additions & 19 deletions drivers/gpu/drm/exynos/exynos_drm_rotator.h

This file was deleted.

7 changes: 5 additions & 2 deletions drivers/gpu/drm/exynos/exynos_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,10 +1068,13 @@ static void hdmi_audio_config(struct hdmi_context *hdata)
/* Configuration I2S input ports. Configure I2S_PIN_SEL_0~4 */
hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_0, HDMI_I2S_SEL_SCLK(5)
| HDMI_I2S_SEL_LRCK(6));
hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_1, HDMI_I2S_SEL_SDATA1(1)
| HDMI_I2S_SEL_SDATA2(4));

hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_1, HDMI_I2S_SEL_SDATA1(3)
| HDMI_I2S_SEL_SDATA0(4));

hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_2, HDMI_I2S_SEL_SDATA3(1)
| HDMI_I2S_SEL_SDATA2(2));

hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_3, HDMI_I2S_SEL_DSD(0));

/* I2S_CON_1 & 2 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/exynos/regs-fimc.h
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@
#define EXYNOS_CIIMGEFF_FIN_EMBOSSING (4 << 26)
#define EXYNOS_CIIMGEFF_FIN_SILHOUETTE (5 << 26)
#define EXYNOS_CIIMGEFF_FIN_MASK (7 << 26)
#define EXYNOS_CIIMGEFF_PAT_CBCR_MASK ((0xff < 13) | (0xff < 0))
#define EXYNOS_CIIMGEFF_PAT_CBCR_MASK ((0xff << 13) | (0xff << 0))

/* Real input DMA size register */
#define EXYNOS_CIREAL_ISIZE_AUTOLOAD_ENABLE (1 << 31)
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/exynos/regs-hdmi.h
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@

/* I2S_PIN_SEL_1 */
#define HDMI_I2S_SEL_SDATA1(x) (((x) & 0x7) << 4)
#define HDMI_I2S_SEL_SDATA2(x) ((x) & 0x7)
#define HDMI_I2S_SEL_SDATA0(x) ((x) & 0x7)

/* I2S_PIN_SEL_2 */
#define HDMI_I2S_SEL_SDATA3(x) (((x) & 0x7) << 4)
Expand Down

0 comments on commit d73e011

Please sign in to comment.