Skip to content

Commit 667f01b

Browse files
tdzgregkh
authored andcommitted
drm/mgag200: Set DDC timeout in milliseconds
commit ecde5db upstream. Compute the i2c timeout in jiffies from a value in milliseconds. The original values of 2 jiffies equals 2 milliseconds if HZ has been configured to a value of 1000. This corresponds to 2.2 milliseconds used by most other DRM drivers. Update mgag200 accordingly. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com> Fixes: 414c453 ("mgag200: initial g200se driver (v2)") Cc: Dave Airlie <airlied@redhat.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Maxime Ripard <mripard@kernel.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: Jocelyn Falempe <jfalempe@redhat.com> Cc: dri-devel@lists.freedesktop.org Cc: <stable@vger.kernel.org> # v3.5+ Link: https://patchwork.freedesktop.org/patch/msgid/20240513125620.6337-2-tzimmermann@suse.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent ab02324 commit 667f01b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/mgag200/mgag200_i2c.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ int mgag200_i2c_init(struct mga_device *mdev, struct mga_i2c_chan *i2c)
114114
i2c->adapter.algo_data = &i2c->bit;
115115

116116
i2c->bit.udelay = 10;
117-
i2c->bit.timeout = 2;
117+
i2c->bit.timeout = usecs_to_jiffies(2200);
118118
i2c->bit.data = i2c;
119119
i2c->bit.setsda = mga_gpio_setsda;
120120
i2c->bit.setscl = mga_gpio_setscl;

0 commit comments

Comments
 (0)